当多人对同一个文件进行更改时管理 github 存储库
我有一个 GitHub 存储库,有多个贡献者同时进行更改。我与合并拉取请求发生冲突,因为当有人想要提交他们所做的更改以供审查时,一直在同一文件中处理部分代码的其他人最终将拥有一个过时的存储库他们的本地设备。每当他们计划通过更改发出拉取请求时,存储库就已经发生了更改。
在发出拉取请求之前,通过命令行提交更改以确保您拥有更新的存储库并且本地设备上的更改不会通过重新拉取而删除的正确方法是什么?
我应该如何正确指导我的团队对我的存储库进行更改,同时避免更新文件发生冲突?
在审查拉取请求时我应该采取哪些步骤以确保我正确合并?
I have a GitHub repo that has multiple contributors making changes at the same time. I'm having conflicts with merging pull requests because by the time someone wants to submit changes they've made to be reviewed, someone else who had been working on a portion of the code in the same file will end up having an outdated repository on their local device. Whenever they plan to make their pull request with the changes, the repository had already been changed.
What is the proper way to submit changes through the command line before making a pull request to ensure you have the updated repository and the changes on your local device arent removed by re-pulling?
How should I properly be instructing my team to make changes to my repository while avoiding conflicts of files being updated?
What steps should I be taking when reviewing pull requests to make sure I am merging properly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是使用 GitHub 等版本控制工具时非常常见的场景。没有解决方案可以完全避免合并,位于同一个存储库中,但有几种方法可以帮助您减少合并:
谢谢!
This is a very common scenario with version control tools like GitHub. There is NO solution to avoid merges completely, being in the same repository but there are a few ways that can help you reduce merges:
Thanks!