back to notes

Git Revisions: Tilde and carat

"In a merge, the main branch is parent #1, the merged in branch is parent #2.
So, HEAD^2 will be the merged parent, whereas HEAD^1 will be the parent merged into."
"Tilde ALWAYS means first parent. So HEAD~2 == HEAD^^"

Sources:
* https://gist.github.com/esmooov/2789156#oh-cool-but-whats-head
* https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
* http://www.paulboxley.com/blog/2011/06/git-caret-and-tilde


last updated november 2016