Recommended Posts

So here’s the problem, I have one folder called A that I store my project in. And this folder had its own git repo called: repo-A. In order to test some feature I wanted to add in, I created a clone of folder A, called B.

And after I’ve done adding in all features I want to add in, I pushed folder B into my repo-A. Now I want to revert it back to its last state.

I couldn’t understand all the online tutorials about git revert or git reset.

I didn't really understand what you have done. When you say push I assume you have a remote repo? Is folder B inside folder A? Did you push folder A or B to the remote repo? What do you want the end result to be?

Regardless, it doesn't sound like you are using git as intended. Normally you would create a new branch to test some feature and then merge into master. Also, having many different copies of the same repo locally kind of defeats the purpose of a version control system. Lastly, I think it would be a good idea to create a dummy project so that you can experiment with adding new files, commits, branches, merging and all of that so that you can get the hang of it without having to deal with 300mb of node modules

I didn't really understand what you have done. When you say push I assume you have a remote repo? Is folder B inside folder A? Did you push folder A or B to the remote repo? What do you want the end result to be?

Regardless, it doesn't sound like you are using git as intended. Normally you would create a new branch to test some feature and then merge into master. Also, having many different copies of the same repo locally kind of defeats the purpose of a version control system. Lastly, I think it would be a good idea to create a dummy project so that you can experiment with adding new files, commits, branches, merging and all of that so that you can get the hang of it without having to deal with 300mb of node modules

I have a remote repo that is linked to folder A. And folder B is not inside of folder A.