Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git log --graph のコミットハッシュ値を全部相対表現で表示する
$ git log --graph --oneline
*-. 9010104 Merge branches 'master3' and 'master2'
|\ \
| | * dd0ba6d add b2
| * | 75a99a0 add b3
| |/
* | 743ad3b add b1
|/
* 81b919d add a
(↓相対表現しておくとbranch tip以外のコミットをcheckoutするときにしやすい。)
$ git log --graph --pretty=oneline |git name-rev --stdin --name-only
*-. master Merge branches 'master3' and 'master2'
|\ \
| | * master2 add b2
| * | master3 add b3
| |/
* | master~1 add b1
|/
* master2~1 add a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.