N
N
NeKt02020-10-05 18:17:05
git
NeKt0, 2020-10-05 18:17:05

How to remove all commits in a local repository?

Good day to all!

I have a test project called agima_test that only exists on a laptop (see screenshot below).

5f7b30fa6ab05156714971.png

As part of learning Git, I committed changes to this project. Accordingly, everything was saved in the local repository.

Then in GitHub I needed to create a separate project for all test projects, called it test-mini-projects. Cloned to a folder on the laptop, then copied the agima_test project there. But alas - Source Control in VS Code did not show anything, although it should have. As if I did not add anything to the test-mini-projects project (see screenshot below).

5f7b32b7ac558974741988.png

Somehow I managed to wipe out all local commits. I do not remember exactly how - a couple of weeks passed. But when I go to the agima_test project folder, Source Control in VS Code shows me the files not added to the stage. So all the same, changes in the project continue to be tracked, but I no longer need it. I need test-mini-projects to track the added agima_test project.

What am I doing wrong? I want to understand this at an early stage.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NeKt0, 2020-10-15
@bubn0ff

Problem solved. I just made hidden files and folders visible, after which I deleted the .git folder in the agima_test project. For some reason, I didn't think of that right away.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question