0

How to copy vocode folder without GitHub repository?

id like to better my code so i copied the project's folder but when i want to commit it to GitHub its automatically connected to the original project's repository.

how do i clone/duplicate a vs code project and commit it to a new GitHub repository? thank you

i tried copying my project to make an original folder with it being the "safe" code that works, and make a copy to try and better my code without changing the original one and risk loosing all of my work.

  • You probably want to remove/change the repository’s remote reference. This might be a keyword to search for – jraufeisen Nov 16 '22 at 07:59

1 Answers1

0

Git keeps the repository and local settings in a subfolder .git which is why when you copied the folder all settings got copied, too.

You can change the remote repository from within vscode via the settings in the source control panel -> Remote -> Add/Remove Remote

Or if you have git for the commandline:

git remote set-url origin <new-remote-url>
cafce25
  • 15,907
  • 4
  • 25
  • 31