|
|
|
|
|
by Yasuraka
610 days ago
|
|
Did you mean reflog? Either way, even simpler, imho, than any log that one has to comb through after the fact is to create a named backup branch=$(git branch --show-current) && git switch -c backup-${branch} && git switch -
Carry on as planned and if you bork it all, switch to the backup branch which retains the original commits and all, delete the borked one and have another go git switch backup-somebranch && git branch -D somebranch && git branch -m somebranch
|
|
Note: First I thought that `ORIG_HEAD` was the thing. But that won’t work if you did `git reset` during the rebase.
(`ORIG_HEAD` is probably “original head”, not “origin head” (like the remote) that I first thought…)
[1] You just have to comb through documentation!