Main commands
| Command | What it does |
|---|---|
git init |
Start a repository here |
git clone url |
Copy a repository from GitHub |
git status |
Where is everything? |
git add . |
Stage everything |
git commit -m "msg" |
Save a snapshot |
git log --oneline |
The history, one line each |
git push |
Send commits to GitHub |
git pull |
Bring other people’s commits back |
Source: Lodato (2010)
.gitignorelists what Git should never track: by name (secrets.txt), by pattern (*.csv), or by folder (data/)- Use it for anything large, private, or regenerated