0

By mistake I have made my desktop the master branch, all changes I do on my computer are now shown in visual studio code. Is there a way to get around this problem?

Braiam
  • 1
  • 11
  • 47
  • 78
Aves
  • 1
  • Does this answer your question? [Move existing, uncommitted work to a new branch in Git](https://stackoverflow.com/questions/1394797/move-existing-uncommitted-work-to-a-new-branch-in-git) – It'sNotMe Jan 25 '21 at 08:30

1 Answers1

0

Okay so I found out how to do it on my own through another post here on Overflow (I'm new to this):

^C[~ (master #)]$ ls -al | grep .git

You should see the following files: .git .gitconfig

qc^C[~ (master #)]$ rm -rf .git

(recursively remove the .git file)

Aves
  • 1
  • 1
    Just to be clear, your desktop was never your "master branch", you simply had created a Git repository in your home directory. This command didn't fix a branch, it *removed the entire repository*, which is something anyone reading this answer needs to be aware of. – chepner Aug 09 '22 at 15:20