简体   繁体   English

Git-远程分支分支存储库

[英]Git - remote branches forked repository

I created a fork on github of an existing project that I want to develop according to own needs. 我在我想根据自己的需求进行开发的现有项目的github上创建了一个fork。 But I want to regularly synchronize own repository from the upstream repository. 但我想定期从上游存储库同步自己的存储库。 So I'm interested (only) in branch upstream/master. 因此,我(仅)对分支上游/母版感兴趣。 Are any other remote branches can safely delete? 还有其他远程分支可以安全删除吗?

If you only want to pull from upstream/master , then you only need the branch which is tracking that remote branch. 如果您只想从upstream/master拉,则只需要跟踪该远程分支的分支。 All other branches are superfluous and can be deleted. 所有其他分支都是多余的,可以删除。

You can then create local branches for your own work that are not tracking any remote branch. 然后,您可以为自己的工作创建不跟踪任何远程分支的本地分支。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM