我在Git中创建了一个新分支:
git branch my_branch
Run Code Online (Sandbox Code Playgroud)
推它:
git push origin my_branch
Run Code Online (Sandbox Code Playgroud)
现在说有人在服务器上做了一些更改,我想从中拉出来origin/my_branch.我做:
git pull
Run Code Online (Sandbox Code Playgroud)
但我得到:
You asked me to pull without telling me which branch you
want to merge with, and 'branch.my_branch.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like …Run Code Online (Sandbox Code Playgroud) 我已经阅读了关于push命令的git man,但我仍然不明白在push.default中设置当前和上游之间的确切区别
我希望我们的团队能够进行推送,并且只会对他们当前正在处理的分支进行更改.据我所知,当我做git branch时,这个分支是用*(星号)标记的分支.
谢谢你的帮助.