There is no tracking information for the current branch. Please specify which branch you want to merge with. If you wish to set tracking information for this branch you can do so with:
環境
git version 2.41.0.windows.1
code:error.log
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> xxxxx
これなんのエラーだっけ(2020/06/05)
引数なしでgit pullしたときのエラー
実際に--set-upstream-toを設定してみる
code:ㅤ
git branch --set-upstream-to=origin/develop develop
branch 'develop' set up to track 'origin/develop'.
実行すると.git/configに以下の設定が追加されている
code:.git/config
branch "develop"
remote = origin
merge = refs/heads/develop
upstreamを設定するとgit statusは以下のようになる
code:ㅤ
git status
On branch develop
Your branch is up to date with 'origin/develop'.
今作ったのブランチhotfixを確認する
code:ㅤ
git status
On branch hotfix
upstreamが設定されることによってどうなるのか?
pull, pushが引数無
参考
ブランチ名を省略したgit pull が通らない時の対処 - Qiita
Git 再入門: 引数がない git pull のデフォルトの挙動 (アップストリーム, トラッキングブランチについて) | yunabe.jp
git pull の引数省略の仕組み - まくまくGitノート
履歴
そろそろちゃんと調べる(2023/07/03)