你怎么知道谁将哪个分支合并到了git中? [英] How can you tell who merged which branch into git?
问题描述
我们为一个项目使用 git
,利用 git flow
( http://nvie.com/posts/a-successful-git-branching-model/ )来管理修补程序,功能等。
但是,不知何故 master
)已被合并到 master
以及最近的 git push
发布了 develop
分支!
- 如何找出谁将
开发
合并为master
并完成后 - 如何才能取消这个,考虑到可能在这次合并之后已经提交了,并且新的
master
已经被投入生产了吗? / li>
谢谢大师。
编辑:事实证明,一个 git流程功能
应该已从开发
分支并合并回到开发
被错误地合并到 master
(不是由
git flow
,但是手动完成)。我无法追踪它,因为 git log --oneline master
看起来像这样:
abcdef合并分支'feature / 1234'到分支'master'中
编辑:我发布了一个后续问题。感谢您的反馈。
嗯,我通常只是做一个git日志,并找出谁做了什么。留在分支上(在你的案例中)并发出git log命令。你应该看看谁做的很简单。
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
develop
intomaster
and 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
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?
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.
这篇关于你怎么知道谁将哪个分支合并到了git中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!