How can you tell who merged which branch into git?

风格不统一 提交于 2020-01-07 06:54:22

问题


We are using git for a project, making use of git flow (http://nvie.com/posts/a-successful-git-branching-model/) to manage hotfixes, features, etc.

However, somehow the changes in develop (which is weeks ahead of master) have been merged into master, and a recent git push has published the unstable develop branch!

  1. How can I find out who merged develop into master and when this was done?
  2. How can I undo this, given that there will likely have been commits made after this merge, and also given that the new master has been pushed into production?

Thank you, gurus.

EDIT: It turns out that a git flow feature which should have been branched off of develop and merged back into develop was incorrectly merged into master as well (not by git flow, but manually done). I couldn't track it down because the git log --oneline master looked like this:

abcdef Merged branch 'feature/1234' into branch 'master'

EDIT: I've posted a follow up question. Thank you for the feedback thus far.

How can you tell who merged which branch into git?


回答1:


Well i normally simply do a git log and find out who did what. Just stay on the branch (in your case master) and issue the "git log" command. You should get to see who did what pretty simply.



来源:https://stackoverflow.com/questions/31910224/how-can-you-tell-who-merged-which-branch-into-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!