你怎么知道谁将哪个分支合并到了git中? [英] How can you tell who merged which branch into git?

查看:356
本文介绍了你怎么知道谁将哪个分支合并到了git中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们为一个项目使用 git ,利用 git flow http://nvie.com/posts/a-successful-git-branching-model/ )来管理修补程序,功能等。



但是,不知何故中的变化发展 master )已被合并到 master 以及最近的 git push 发布了 develop 分支!


  1. 如何找出谁将开发合并为 master 并完成后

  2. 如何才能取消这个,考虑到可能在这次合并之后已经提交了,并且新的 master 已经被投入生产了吗? / li>

谢谢大师。

编辑:事实证明,一个 git流程功能应该已从开发分支并合并回到开发被错误地合并到 master (不是由 git flow ,但是手动完成)。我无法追踪它,因为 git log --oneline master 看起来像这样:

  abcdef合并分支'feature / 1234'到分支'master'中

编辑:我发布了一个后续问题。感谢您的反馈。



你怎么知道谁把哪个分支合并到git中?

解决方案

嗯,我通常只是做一个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!

  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?

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆