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

Re: Messed up a salsa commit - how best to fix?



Hi Julian,

* Julian Gilbey <julian@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...

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?
$ 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.


Cheers
Timo

--
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

Attachment: signature.asc
Description: PGP signature


Reply to: