git 将其他人的提交显示为我的提交
我们是两个在“中央”git 存储库工作的程序员。我们都推送到中央存储库上的同一个“主”分支。
昨天我推送了一堆提交,其他程序员后来拉了它们。
现在 git 正在向他展示我昨天的所有提交,因为这些提交已准备好从他的机器推送到中央存储库。
我们不太确定如何处理这个问题,而且我还没有找到任何关于类似情况的讨论。
请注意,我们都在 Windows 上,使用 GitExtensions、TortoiseGit 和 msysgit 1.6.5.1。中央存储库位于 ProjectLocker 上。
We're two programmers working off of a "central" git repository. We're both pushing to the same "master" branch on the central repository.
Yesterday I pushed a bunch of commits and the other programmer later pulled them.
Now git is showing him all of my commits from yesterday as out commits ready to be pushed from his machine to the central repository.
We're not quite sure how to handle this, and I haven't found any discussions on similar situations.
Note that we're both on Windows, using GitExtensions, TortoiseGit and msysgit 1.6.5.1. The central repository is on ProjectLocker.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是否在你朋友的机器上进行了 git log 并检查 git 是否真的认为它们是他的提交?实际上,我认为所发生的一切都是他在将您的代码拉入本地存储库之前进行了一些不同的提交。这意味着当他从他的机器推送到中央存储库时,中央存储库的历史记录将被更改为看起来像您所看到的输出提交。
请执行 git log 以查看每个提交的提交作者。
Did you do a git log on your friend's machine and check if git really thinks that they are his commits? Actually, I think all that has happened is that he made some diverging commits before he pulled your code into his local repository. It means that when he pushes from his machine to the central repository, the history of the central repository will be altered to look like the out commits that you are seeing.
Please do a git log to see the commit author for each of the commits.