[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gbp import-orig --uscan for the non-trivial cases



On 31/08/2025 14:30, Marc Haber wrote:
I am also confused by gbp push complaining a non-fast-forward update on debian/upstream while manually pushing that branch works just fine. Can somebody explain this?

| [25/4863]mh@salida:~/packages/console-log/console-log (debian/latest| u+2) $ gbp push
...
| gbp:info: Pushing 26a1f5b69ee0b157595e748b0f311d98a64ee261 to origin:refs/heads/upstream/latest | gbp:error: Error running git push: To salsa.debian.org:debian/console- log.git |  ! [rejected]        26a1f5b69ee0b157595e748b0f311d98a64ee261 -> upstream/latest (non-fast-forward) | error: failed to push some refs to 'salsa.debian.org:debian/console- log.git' | hint: Updates were rejected because a pushed branch tip is behind its remote

Sounds like your local commits are missing something that's on the remote repo (i.e. behind).

If you do this...
$ git fetch origin
$ git status upstream/latest

You should generally see either
- Your branch is up to date
- Your branch is ahead ...

If instead you see that your local is "behind", then gbp-push won't work and you should either
- fix the remote branch with git-push--force
- fix the local one with git-pull.

The commit 26a1f5b69ee0b157595e748b0f311d98a64ee261 that gbp push wants to push to upstream/latest is already in the history of upstream/latest. I don't understand that.

It's not the tip commit 26a1f5 that's the issue, it's likely what's under it. I'd spend some time comparing git-log for local vs remote.

Did you recently cleanup/squash any commits from the local branch?

--
Regards,
Ahmad


Reply to: