Show commits involved in a prior git merge

前端 未结 3 1174
失恋的感觉
失恋的感觉 2020-12-02 15:20

Say I create a hotfix branch off of a develop branch, make two commits, merge this back to the develop branch, and destroy the h

3条回答
  •  感情败类
    2020-12-02 16:08

    Say your merge commit is ab2f8173, git log ab2f8173^..ab2f8173 will show the commits which it merged in.

    Here is how to turn this into a git alias for easy re-use:

    $ git config --global alias.merge-log '!f() { git log --stat "$1^..$1"; }; f'
    $ git merge-log 0865c12
    

提交回复
热议问题