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?


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 .


如果你的分支历史发生了变化,并且它指向了不同的头部,你需要按照如下方式进行强制推送:

git push origin master - - force
链接地址: http://www.djcxy.com/p/4646.html

上一篇: 分支存在于本地,但不在原点

下一篇: 我如何推特定分支?