Is there a way to see commit hash instead of HEAD?

Viewed 71

I got conflict: enter image description here

Is there an option to show last commit hash for changes at HEAD (green underline).

I expect this: HEAD, 476ce2c Simplify interface: remove 'rs' parameter
which will be similar to >>>>>>> section

1 Answers

You could in-place replace it yourself

find ./ \( -type d -name .git -prune \) -o -type f -print0 | xargs \
    sed -i "s/<<<<<<<< HEAD/<<<<<<<< $(git rev-parse --short HEAD)/"

Consider git log --pretty=reference -n 1 head as the command (git rev-parse --short is just the short hash) or refer to the docs to build exactly what you want as git log --pretty=format:"whatever you like" -n 1 head https://git-scm.com/docs/pretty-formats

find|xargs modified from top answer to How to do a recursive find/replace of a string with awk or sed?

Related