这么多未使用的分支。如何清理? [英] So many unused branches. How to cleanup?
问题描述
* master
newbranch
remotes / origin / HEAD - >起源/大师
遥控器/原产地/ api-notes
遥控器/原产地/事件创建验证器
遥控器/原产地/主控制器
遥控器/原产地/组织者地点-bug-demo
remotes / origin / ticket-180
-
当前分支主人不同于origin / master还是这些分支一起工作?
如何检测不同分支中的最后更改以及如何删除他们清理?
非常感谢。
1 /是目前的分支主人不同于origin / master还是这些分支一起工作?
如果它从克隆后的 origin / master
),并且不跟踪 origin / master
(参见如何更改远程git分支正在追踪?)。
2 /如何删除它们以清理
您可以使用以下命令从远程名称空间中删除一个分支:
git branch -rd origin / api-笔记
(更多资讯如何从Git中删除无效的远程分支引用?)
您可以通过git diff或git log两个分支来查看提交您没有:
请参阅> Git diff ..? ..
和没有点是什么区别?。
另请参阅 Git:比较所有本地提交到远程回购版本。
I have the following branches:
* master
newbranch
remotes/origin/HEAD -> origin/master
remotes/origin/api-notes
remotes/origin/event-creation-validation
remotes/origin/master
remotes/origin/organizerlocation-bug-demo
remotes/origin/ticket-180
Is the current branch master different from origin/master or are these branches working together?
How can I detect the last changes in the different branches and how can I delete them to cleanup?
Thank you very much.
1/ Is the current branch master different from origin/master or are these branches working together?
It is different (even if it started from origin/master
after the clone), and is not tracking origin/master
(see "how do I change the remote a git branch is tracking?").
2/ how can I delete them to cleanup
You can delete a branch from the remotes namespace with:
git branch -rd origin/api-notes
(More at "How do you Remove an Invalid Remote Branch Reference from Git?")
You can git diff or git log two branches to see the commits you don't have:
See "Git diff .. ? What's the difference between having ..
and no dots?".
See also "Git: Compare All Local Commits to Remote Repo Version".
这篇关于这么多未使用的分支。如何清理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!