Reputation: 4353
I had some huge files in a folder, let's call it Folder1
and could not commit. I removed the huge files but they remained in the git history, so I tried this on the entire folder....and I lost my folder.
Please, is there a way to revert this huge mess-up?
Upvotes: 1
Views: 68
Reputation: 433
You can do a git reset --hard origin/master
to get the files from the last push to github.
YOU WILL LOSE EVERY DATA THAT IS NOT COMMITED
That's only working if you already pushed your files to github.
And if you don't commited your files try:
git reset
git checkout -- $(git ls-files -d)
Upvotes: 2