level 1
ninjaes
楼主
想问下 远程有两个分支test1,test2, 我本地test2分支想更改为后面每次提交都是去test1。先是做了git branch --set-upstream-to=origin/test1 test2.但是每次在test2的本地分支提交代码还是要我使用下面的两种方法,想问下,这个是不是还需要再设置什么之后,每次提交可以直接使用git push到test1上,设置git push -u origin test2:test1 和 git push --set-upstream origin HEAD:test1 还是下面的提示
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:test
To push to the branch of the same name on the remote, use
git push origin HEAD
To choose either option permanently, see push.default in 'git help config'.
2022年01月09日 16点01分
1
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:test
To push to the branch of the same name on the remote, use
git push origin HEAD
To choose either option permanently, see push.default in 'git help config'.