'undo git filter-repo and restore deleted repository
I did a git filter-repo and now all files are deleted. VS code gitgraph is showing that the repo has no commits. Is there any way to restore my repo? My whole project got deleted and its a local repo so I don't have any backup. I have been working on it for months. Its killing me. PLEASE HELP. I'm desperate.
I have a commit-map file in the filter-repo folder in the .git with contents like this:
old new
2dcc8b30c4fb13d32f7b448c77a487de1a1d9bd5 0000000000000000000000000000000000000000
4e6915559685c96fe9dc336e1c929f129b603cbc 0000000000000000000000000000000000000000
8bf8d9d278523bf10d50b568eab1f8e5ac6cf8eb 0000000000000000000000000000000000000000
06a897ea4763c3f6034ccdd15e906580dda5f27b 0000000000000000000000000000000000000000
92e8933b223cd7e40bc80f9ac0a2853978bede3d 0000000000000000000000000000000000000000
0b7e2ade7c560078178cb66c0b3acd7d50b5fc10 0000000000000000000000000000000000000000
c296e3f6dd1cfcea8c3ec536c21d17112a9a0222 0000000000000000000000000000000000000000
8ce24d364c43023585109ef680dc2e4dadeeeff6 0000000000000000000000000000000000000000
e9614633a8463e3cdcf0a47206e0639a06aa7527 0000000000000000000000000000000000000000
66f3b8712aa57eaa396251dcc0f5f3285db5ff3b 0000000000000000000000000000000000000000
44442eace317b2b19063cc8c31ffe4a81d216ee7 0000000000000000000000000000000000000000
42877255047bf0376002b98173607a6a89bfab71 0000000000000000000000000000000000000000
54db7f7714302506a137c7b28bcb9a2bad7fc2b4 0000000000000000000000000000000000000000
0f3416c5c8fd3951d7e59a4d23db63f74b9383a3 0000000000000000000000000000000000000000
56379fdd472c102dd50691d9294d27da4b7c9a3d 0000000000000000000000000000000000000000
cc6bb41310efe3e5c2d0f58c956b3dcfd2b9e41a 0000000000000000000000000000000000000000
d7b1b929c943d923e91640b5bcdf49003c6f97cd 0000000000000000000000000000000000000000
f70375aae8340cccfb3c7db235e08464d9cfd1d8 0000000000000000000000000000000000000000
1dfe31b45b82aeb7ef514d81f26547736d60501a 0000000000000000000000000000000000000000
d19e2c4829a2c38c1a0c2adbe60e5a9ca70f7700 0000000000000000000000000000000000000000
7961c20ba12b49ef13996d34f5c4ac6038848418 0000000000000000000000000000000000000000
26ca13021b43c0b8b1b4e6a03948eb091ac6eb12 0000000000000000000000000000000000000000
f03d117ed04f449ae4f4ec1e61e895883acbe491 0000000000000000000000000000000000000000
f0d6ee7e4c778d28f65c864752f0e5cb80648fca 0000000000000000000000000000000000000000
5ce120582976dce9e8921c26adfdd7e5f23814c8 0000000000000000000000000000000000000000
818cd9397dbaa6278f0c33d9ce0ee5115c0c071b 0000000000000000000000000000000000000000
c4cd1317a269f9dc59ded0b9888754c6c205b711 0000000000000000000000000000000000000000
and a ref-map file with:
c4cd1317a269f9dc59ded0b9888754c6c205b711 0000000000000000000000000000000000000000 refs/heads/master
Is there any way I can restore. Its a disaster. I'm literally crying. PLEASE HELP
Edit: commands i used
D:\my_project>git filter-repo --force --subdirectory-filter back\
Parsed 27 commits
New history written in 0.53 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
Updating files: 100% (6161/6161), done.
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Completely finished after 9.45 seconds.
D:\my_project>git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
.vscode/
front/
nothing added to commit but untracked files present (use "git add" to track)
D:\my_project>git log
fatal: your current branch 'master' does not have any commits yet
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
