Commit
Operators
~ Operator
- allows us to reach parent commits
- ex.
git show HEAD~2
shows the grandparents of HEAD
- ex.
- if the commit has more than 1 parent (ie. merge commit), then the first parent of the commit will be used by default.
- Need to use
^
to specify a different commit
- Need to use
^ Operator
- allows us to specify which parent we want to refer to
- spec: therefore, if there is only one parent, then `HEAD~1` refers to the same commit as `HEAD^1`
Children