[git-buildpackage] Is there a way to manually reconstruct the upstream branch if it diverged?

Markus Blatt markus at dr-blatt.de
Fri Oct 24 21:13:57 CEST 2025


Hi,

I must have somehow messed up my local upstream branch before running "gbp import --uscan".
I think I did a "git reset --hard" with a wrong earlier commit and lost at least one tag on the upstream
branch

Unfortunately, I only noticed this after uploading the new version to unstable when I ran gbp push.
It failed because the remote and local upstream branches aree diverged.

The current status is
- pristine-tar branch has the last tarball and is pushed
- master branch (which holds the status for Debian unstable), has the tag for the last uploaded Debian release.
- local upstream branch has diverged from origin/upstream.

Is there a good way to manually fix my local upstream branch and push?

Thanks a lot for your help.

Best,

Markus





More information about the git-buildpackage mailing list