通常、リモートブランチからデータを自動的に取得してマージし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
またははまだ使用できますgit push origin mybranch-s48
。
このブランチはリストにはありませんが、実行時Local branches configured for 'git pull':
にリストにのみ含まれますLocal refs configured for 'git push':
git remote show origin
誰か助けてくれませんか