You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hasnat Anjum Haz edited this page Nov 8, 2021
·
1 revision
I have written a bunch of code yesterday in a git branch. Today instead of checking in to the branch, I deleted it accidentally! And only then I remembered, I haven't pushed the code to the remote too.
Ah, it happens, so here comes git reflog
gitreflog--no-abbrev
(Did you know they store so many information there?)
Copy the SHA1 for the commit at the tip of your deleted branch. Then