by roganartu · 4y ago · 0 comments
`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).
The `tmp` command creates a commit of all changes, branches it, then rolls back the commit.
[1] https://github.com/flurdy/dotfiles/blob/master/.config/fish/...