$ git checkout -b dev/test
Switched to a new branch 'dev/test'
$ git push
fatal: The current branch dev/test has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin dev/test
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
$ git push --force
fatal: The current branch dev/test has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin dev/test
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
1条答案
按热度按时间sr4lhrrt1#
在git 2.40.0中,
--force
不会改变git push
在没有设置上游的情况下(当没有设置push.default
和push.autoSetupRemote
配置时)的行为。