将未更新的分支推送到 master,这怎么可能?
Pushed unupdated branch to master, how is that possible?
本周早些时候我做了一些工作,致力于我的本地主机并推送到远程主机(在 Bitbucket 上)。后来我的同事处理了同一个文件,但没有先执行 git pull。然后他提交并推送他的代码到 master,现在我们远程 master 的头部包含他的代码更改,但不再是我的。这怎么可能?我知道推送给 master 是不受欢迎的,但他的推送不应该被拒绝吗?还是他用力推了一下?他使用 Phpstorm 执行他的 git 命令,也许这是 phpstorm 的东西?
马克
How is that possible?
有可能他们使用了强制推送。
I know pushing to master is frowned upon but still, should his push
not be rejected?
这取决于存储库的配置方式。我不知道 BitBucket 如何管理这个,但作为一个例子,GitHub 支持禁用强制推送。
Or maybe he did a forced push?
可能。
He uses Phpstorm to do his git commands, maybe this is a phpstorm
thing?
描述中没有任何内容听起来像是 Phpstorm 的东西。
本周早些时候我做了一些工作,致力于我的本地主机并推送到远程主机(在 Bitbucket 上)。后来我的同事处理了同一个文件,但没有先执行 git pull。然后他提交并推送他的代码到 master,现在我们远程 master 的头部包含他的代码更改,但不再是我的。这怎么可能?我知道推送给 master 是不受欢迎的,但他的推送不应该被拒绝吗?还是他用力推了一下?他使用 Phpstorm 执行他的 git 命令,也许这是 phpstorm 的东西?
马克
How is that possible?
有可能他们使用了强制推送。
I know pushing to master is frowned upon but still, should his push not be rejected?
这取决于存储库的配置方式。我不知道 BitBucket 如何管理这个,但作为一个例子,GitHub 支持禁用强制推送。
Or maybe he did a forced push?
可能。
He uses Phpstorm to do his git commands, maybe this is a phpstorm thing?
描述中没有任何内容听起来像是 Phpstorm 的东西。