Git Cheat sheet in all its glory..!
Some scenarios with a bit more explicit commands
cd ~/projects/myproject
git init
touch .gitignore
> use http://www.gitignore.io
git add .gitignore
git commit -m 'added gitignore'
git add .
git commit -m 'initial commit'
git clone ~/existing/repo
git clone http://remoteRepository/project.git
git checkout B2
git merge B1
- Start merge (git merge)
- Use editor to search for merge conflict (HEAD)
- Resolve conflicts
- git commit
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git lg
git diff --word-diff
git diff --cached
git diff --name-only <commit-hash> <commit-hash>
- Register at gitub using your @uke.de email
- Go to https://education.github.com/discount_requests/new
- Apply for a student pack