Differences between revisions 2 and 3
Revision 2 as of 2010-03-19 14:30:35
Size: 636
Comment:
Revision 3 as of 2010-03-24 14:19:23
Size: 800
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
 * fetch, examine and rebase
{{{
git fetch <remote repository> <remote branch>
git log -p HEAD..FETCH_HEAD
git rebase <remote repository> <remote branch>
}}}

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>

DynareWiki: MichelCheatsheet (last edited 2010-08-26 13:55:30 by MichelJuillard)