Friday, October 18, 2019

Learn git relative ref (Part2)

If you want to move a lot of levels in the commit tree. You will type ~(index) instead of type ^  server times.


Examples:
- Original:                                                                 - Expect: git checkout HEAD~4



           











- Otherwise, you can directly assign a branch to a commit with the -f option. So something like:

-Origin:                                                                    - Expect: git branch -f master HEAD~3

Examples
- ss

No comments:

Post a Comment