[英]How do i git push specific branch?
I have two branch : 我有两个分支:
:git branch
dev1.1
* master
I have some local changes to the master I want to push. 我对要推送的主人有一些本地更改。 How do I specifically push master branch only?
我如何专门推送master分支?
You can use the following: 您可以使用以下内容:
git push <remote_alias> <branch_name>
So in your case, it would probably be: 所以在你的情况下,它可能是:
git push origin master
If you have already committed your change, then you can push your changes to remote from any branch. 如果您已提交更改,则可以将更改从任何分支推送到远程。
git push origin branch_name
In your case, branch is master
. 在您的情况下,分支是
master
。
you could use something like this: 你可以使用这样的东西:
git push git@github.com:bliep/blup.git fork-feature:feature
This will push your local fork-feature
branch to the feature
branch of the git@github.com:bliep/blup.git
repository! 这会将您的本地
fork-feature
分支推送到git@github.com:bliep/blup.git
的feature
分支git@github.com:bliep/blup.git
存储库! I use this to help out colleagues with their PR's sometimes. 我有时用这个来帮助同事们做PR。
如果您的分支的历史记录发生了变化并指向不同的头部尖端,则需要按如下方式进行强制推送:
git push origin master - - force
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.