Michel's cheat-sheets
GIT
- remove unwanted commits (the unwanted commits remain in the system until garbage correction. Useful for cherry-pick). WARNING, don't reset changes that have already been pushed to other repositories!
git reset --hard <SHA1 key of last good commit>
- add specific commit
git cherry-pick [-x] <SHA1 key of desired commit>
- log with graph
git log --graph
- log difference between two branches (or trees ?)
git log <branch 1>..<branch 2>
- push while forcing
git push -f <destination repository> <local branch>:<destination branch>
- fetch, examine and rebase
git fetch <remote repository> <remote branch> git log -p HEAD..FETCH_HEAD git rebase <remote repository>/<remote branch>