github - How to move the HEAD of the git remote branch?
我想大声告诉你
我想大声告诉你 2017-05-02 09:36:01
0
2
649

Local branch: master and feature
Remote branch: origin master and origin feature

Local switch to feature
git branch -a shows that the remote HEAD points to origin master

At this time, when I git push without adding -u, does it automatically push to the origin master?
So now I want it to HEAD to the origin feature like this

What to do

我想大声告诉你
我想大声告诉你

reply all(2)
漂亮男人

You can try it

git push origin master:feature
If you add

-u, it will be remembered.

But I don’t recommend you to do this, be careful of yourself.

It is recommended to read more git manpages, such as man git-push, which has explanations.

我想大声告诉你
git push <远程主机名> <本地分支名>:<远程分支名>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template