Back

Explore Courses Blog Tutorials Interview Questions
+6 votes
1 view
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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...