问题
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!
- How can I find out who merged
developintomasterand when this was done? - How can I undo this, given that there will likely have been commits made after this merge, and also given that the new
masterhas 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