Reputation: 1360
How do I get the branch/feature name from a sha1 hash on the command line?
Also how is this done using pretty=format syntax.
I see that it's done somehow using this method
git log --graph --full-history --all --color \
--pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
but I don't know which line is causing this.
Upvotes: 3
Views: 602
Reputation: 490497
How do I get the branch/feature name from a sha1 hash on the command line?
You can use...
git branch --contains <sha1>
Upvotes: 2