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
You can try it
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.