Need help removing git changes to a local repo

Preface: this isn’t a Git Stash issue.

Today I made an empty repo on Github and attempted to push a pre-existing project up to it. Following the official documentation lead to error after error. While attempting to fix these errors I did a rebase and I can’t restore back to the previous commits. SO now my project is being held hostage by Git in this dead state since i can’t access any of the files but I can see that they are there in my local directory.

I was already not a fan of git. Please, help me git my project back. I’m unbelievably upset by this and so desperate I’ll even pay for someone’s time to help me. My discord is Herbie#3090.

Hi @Herbie43! :wave: Welcome to the Community!

Sorry to hear you’ve had a frustrating time of it! I’m afraid the learning curve with Git is very steep, and everyone ends up in “Git hell” sooner or later - it’s a rite of passage!

Without knowing the specific errors you were seeing it’s hard to give advice, sorry! If the files exist, and you don’t mind losing the accumulated Git history, one thing you could do is delete the hidden .git folder which lives in the root of the repository. That will convert it from a Git repository to a regular folder, and then you could start from scratch.

We also have a handy blog post that explains how you can undo (almost) anything with Git: