Explore Courses Blog Tutorials Interview Questions
+6 votes
in DevOps and Agile by (29.3k points)

I just initiated a git in a repo with a wrong user and want to undo it. Is there any command for this? Do I actually have to go in and edit the .git directory?

1 Answer

+6 votes
by (50.2k points)
edited by

For this you just need to delete .git using:

rm -rf .git

Then you can recreate it with the right user. Thus, you can undo git init.

For more commands like this please go through the following crash course that will help you to understand git well.

Browse Categories