Given the information from the question, the existing answers, and their comments, it appears that the original poster made a few mistakes after doing the git filter-branch
, and didn't make a backup clone of the repo.
So here are instructions for returning the repo back to its previous state before the filter-branch, if that is something that the original poster wants to do.
Original references
git filter-branch
will automatically save references to your old commits, in case you need to recover them for any reason. You'll find them under your repo's .git/refs/original/refs/
directory:
ls -l .git/refs/original/refs/heads/
total 1
-rw-r--r-- 1 Keoki Administ 41 May 23 01:13 master
ls -l .git/refs/original/refs/tags/
total 1
-rw-r--r-- 1 Keoki Administ 41 May 23 01:13 v1.0
Each of the above references contains the commit sha ID of your old commits:
cat .git/refs/original/refs/heads/master
276fc24dc4b12edf75aea40f4fd50e25a5840005
cat .git/refs/original/refs/tags/v1.0
475593a612141506f59a141e38b8c6a3a2917f85
Use hard resets to recover
To get back your original master
branch (from before you did the filter-branch), just do a hard reset using the references above, or use the commit sha ID contained in them:
git checkout master
# Use reference
git reset --hard refs/original/refs/heads/master
# Or use sha ID
git reset --hard 276fc24dc4b12edf75aea40f4fd50e25a5840005