日々精進

新しく学んだことを書き留めていきます

rebaseしようとしたら「There is no tracking information for the current branch.」エラー

rebaseしようとしたら以下のエラーメッセージが出た。

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details

    git rebase <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> topic1

どうもトラッキングしていないブランチはrebase出来ないらしい。なぜ。。
git branch --set-upstream-to=origin/ topic1
を実行すると直るらしいが、今回の場合、トラッキング先のリモートブランチを作ってなかったので直らなかった。
Pushしてリモートブランチを作ったら直った。