The Simple Git Cheat Sheet
A Helpful Illustrated Guide
Click to enlarge cheat sheet
The Basic Commands
Command | Description |
---|---|
git init | Create new repository |
git clone alice@host:/path/repos | Clone repository |
git add main.py | Add file „main.py“ to project |
git add * | Add all changes to master |
git commit –m “new file” | Commit change and add message „new file“ to the master branch |
git push origin master | Send master branch to remote |
git clone alice@host:/path/repos | Clone repository |
git pull | Update local repository with master branch |
git rm main.py | Remove file „main.py“ from master branch |