在git中推送所有本地分支来源 [英] Push all local branches to origin in git
本文介绍了在git中推送所有本地分支来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我的git中有很多本地分支没有推送到远程存储库。
如何使用单个命令将它们全部推送到原点? 解决方案
你试过了吗?
git push --all -u
git男子声明
- 全部
不是指定每个ref都要推送,而是指定refs / heads /下的所有ref都被推送。
-u, - -set-upstream
对于每个最新或成功推送的分支,添加上游(跟踪)引用,
-u
如果您打算稍后从这些分支中提取
Let's say that I have A LOT of local branches in my git not pushed on the remote repository.
How can I push all of them to origin with a single command?
解决方案
Have you tried
git push --all -u
The git man states
--all
Instead of naming each ref to push, specifies that all refs under refs/heads/ be pushed.
-u, --set-upstream
For every branch that is up to date or successfully pushed, add upstream (tracking) reference,
the -u
is useful if you intent to pull from these branches later
这篇关于在git中推送所有本地分支来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文