通常当我这样做时git pull
,git status
它会自动从远程分支获取并合并数据,并显示可以在该分支上推送的本地提交。
在工作中创建了一个新分支,当我像往常一样做时,我有以下内容:
$ git st
# On branch mybranch-s48
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: src/main/java/com/xxx/batch/bo/utils/DisplayTagUtils.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git commit -am "Test git commit"
[mybranch-s48 28813a3] Test git commit
1 files changed, 2 insertions(+), 0 deletions(-)
$ git st
# On branch mybranch-s48
nothing to commit (working directory clean)
$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.mybranch-s48.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 the following in your configuration file:
[branch "mybranch-s48"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
通常“拉”不需要任何东西,状态会告诉我我有 1 个提交提交。
我仍然可以使用git pull origin mybranch-s48
or git push origin mybranch-s48
。
此分支不在列表中,但在执行时Local branches configured for 'git pull':
仅在列表中Local refs configured for 'git push':
git remote show origin
有人能帮助我吗