Hi Timo, On Tue, Apr 26, 2022 at 01:55:13PM +0200, Timo Röhling wrote: > Hi Julian, > > * Julian Gilbey <jul...@d-and-j.net> [2022-04-26 11:03]: > > It turns out that I'd also messed up more than I'd realised: even when > > I pulled in the updated master branch, I didn't pull the upstream > > branch, so managed to introduce even more conflicts. Oh well. > It's an easy mistake to write "git pull" if you meant to do "gbp > pull". I lost count how often I wrote "git pq" by accident...
Ah, I didn't know about gbp pull/push! I'm definitely going to use those in future (and repeatedly make that same typing mistake!). > > To fix the problem, I did: > > > > $ git checkout upstream > > $ git reset --hard upstream/5.3.0 > Judging from the current commit graph, you probably threw in a > "git merge -s ours origin/upstream" here as well? Yeah :-( Well, sort of. I did the git reset, then git push --all and got an error because I hadn't done a pull on this branch :-( So then I did a git pull on this branch followed by resolving the conflicts.... > > $ git checkout master > > $ gbp pristine-tar commit > > > > and that fixed everything. I finished with git push --all and git > > push --tags. > Nice! > > > I hope I don't make this mistake again! > Don't worry about it too much. Git is quite resilient, and as long > as you do not panic and start force-pushing random stuff, everything > can be repaired. I'm not too worried, just that it took far more effort than it would have done if I'd done things right to begin with! Best wishes, Julian