r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.37k stars 162 forks source link

Git step errors when current branch has no remote tracking branch set #1026

Open underyx opened 1 year ago

underyx commented 1 year ago

What did you expect to happen?

I ran the git step via topgrade targeting a repo where I recently created a local branch for some work in progress. This branch was never pushed to the remote. I expected topgrade to 1) fetch all other branches and 2) consider this branch up-to-date, as there can be no more recent refs for a branch that only exists locally.

What actually happened?

Topgrade fails with an error, where git complains that my local branch has no tracking information.

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
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> bence/my-local-branch

Additional Details