背景
マージすべきブランチがわからないと言われる、
git pull
やgit push
するときに毎回gitのurlを指定しないと行けなくて、面倒だったから
現状
下記のようなエラーが出る、毎回urlを指定するのは面倒、
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=<remote>/<branch> master
解決方法
カレントブランチに upstream を指定する
$ git remote add origin <gitのURL>
$ git push -u origin master
これで解決。
※master == main