2010-08-21 169 views

回答

7

git push --mirror <origin>将使远程的引用匹配本地存储库中的引用,包括删除本地没有的分支。

git help push

--mirror 
    Instead of naming each ref to push, specifies that all refs under 
    refs/ (which includes but is not limited to refs/heads/, 
    refs/remotes/, and refs/tags/) be mirrored to the remote 
    repository. Newly created local refs will be pushed to the remote 
    end, locally updated refs will be force updated on the remote end, 
    and deleted refs will be removed from the remote end. This is the 
    default if the configuration option remote.<remote>.mirror is set.
1

您可以删除远程分支机构我推空分支:

$ git push origin :branch-to-delete 
+0

因为有超过5家分行......我觉得这种方式是低效的是为什么我要寻找其他选择。 – xenoterracide 2010-08-21 06:35:45

相关问题