Background
I normally stick to git cli for all my git operations. The only time I use a git gui tool is when i want to see the location of a git commit relative to the tree.
Right now I have this command line that shows me the git tree:
git log --graph --decorate --pretty=oneline --abbrev-commit --all
which shows me a nice tree illustration:
* 6068f4b (origin/develop) exclude arm64 architecture
* d49b4be Fix crash for global mark jump in Xcode12
* 6e32166 Merge branch 'master' into develop
|\
| * 6356710 (HEAD -> master, origin/master, origin/HEAD) README.md
* | b126142 update project
* | 3b050e5 Failing Unit Test is commented out with FIXME comment addition
* | caad84d improve test
* | 0bc3054 Merge branch 'master' into develop
|\ \
| |/
| * a4a4fdb Fix Yank
* | 39d38ce Merge pull request #308 from chml/fix/yankAndPut
|\ \
Problem
The problem is that if i want to see the location of a git hash in this tree, I have to do the following:
- run
git checkout <target-hash> - run
git log --graph --decorate --pretty=oneline --abbrev-commit --all - scroll on the git tree manually for a while until i see where
HEADis pointing to (this can take a while for git repos that are years old) - switch back to my original commit
git checkout <original-commit>
Question
I would like a command that would make all these steps into one (so I should avoid changing my git HEAD commit). For git GUI's that's a pretty straight forward operation (both gitkraken and sourcetree offer that out of the box). For example in sourcetree this is a jump to commit operation:
Suggestions?
