top | item 31984784

(no title)

roganartu | 3 years ago

Perhaps this is a byproduct of the UI (which I totally agree is bad), but this is not true.

`git reflog` contains a full history of all refs you’ve been on in chronological order. Unless you explicitly delete them, dangling refs are not cleaned up immediately. If you rewrite history and realise you made a mistake, you can likely recover by simply resetting the mutated branch to something from the reflog, even days or weeks afterwards (the default reflog retention is 30 days).

discuss

order

torginus|3 years ago

You learn something every day!

alexchamberlain|3 years ago

Another super simple technique is to create a branch where you start to go back to if you need to; ie if you are rebasing `foo`, start by running `git branch foo-back` and you can always reset back there if needed.