What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-03-10 15:45:04
git lost commit after reset
git reflog is your friend. Find the commit that you want to be on in that list and you can reset to it for example:git reset --hard e870e41 (If you didn't commit your changes... you might be in trouble - commit early, and commit often!) Add solution -
-
Shell/Bash 2021-11-07 22:07:23
git undo deleted local branch
git reflog //You can use git reflog to find the SHA1 of the last commit of the branch. From that point, you can recreate a branch using git branch branchName <sha1> user@MY-PC /C/MyRepo (master) $ git branch -D master2 Deleted branch master2 (was ... Add solution -
Shell/Bash 2021-10-25 19:02:30
git reflog reset
git reflog //to get commitID git reset #commitID Add solution -
Shell/Bash 2021-09-12 19:41:02
how to restore corrupeted git file
8 Step 1: Make a backup of .git (in fact I do this in between every step that changes something, but with a new copy-to name, e.g. .git-old-1, .git-old-2, etc.): cp -a .git .git-old Step 2: Run git fsck --full you will get this error message For examp... Add solution -
Shell/Bash 2021-08-30 10:12:02
add date to git reflog
git reflog --pretty=short git reflog --date=iso Add solution -
-
Best helpers
Ranking is empty