Im beginner in programming and I am writing a project in vs code and trying to commit new files to synchronize with my github.
But 10,000 files in the directory are writing to me C:Usersgerga.DESKTOP-BSQOQP7 .
I tried to do everything reinstalled.
How do I get git to sync files in my folder and not in another one
I tried to change the folder from where 10,000 comments come from my user folder, I tried to clone to a work package on the desktop. I tried to reinstall git, nothing worked
2
Answers
There are two ways to sync with Github.
If you created a new repository on Github and you do not have any existing code in your local, simply clone it to your local by getting the https code from Github.
If you have already code in your machine, as I read you have, you should create a repository on Github (you already did) and now you should sync them. If you create a new repo on Github without readme file Github says:
which means you need to define your remote, change branch into main (Github has main as default) and push up to Github.
Looks like you are missing
.gitignore
Go to: https://www.toptal.com/developers/gitignore/.
and generate the ignore file.
Once generated save it in your main folder as
.gitignore