git:relative_refs
Differences
This shows you the differences between two versions of the page.
git:relative_refs [2016/11/21 11:27] – created peter | git:relative_refs [2019/11/29 15:11] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== GIT - Relative Refs ====== | ||
- | You could use relative refs to move branches around. e.g., git branch -f master HEAD~3, etc. | ||
- | |||
- | The " | ||
- | |||
- | <code git> | ||
- | git checkout master^ | ||
- | </ | ||
- | |||
- | The " | ||
- | |||
- | <code git> | ||
- | # Goes up 4 parents from HEAD. | ||
- | git checkout HEAD~4 | ||
- | </ |
git/relative_refs.1479727660.txt.gz · Last modified: 2020/07/15 09:30 (external edit)