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
.
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! I use this to help out colleagues with their PR's sometimes.
如果您的分支的历史记录发生了变化并指向不同的头部尖端,则需要按如下方式进行强制推送:
git push origin master - - force
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.