How do I put my existing code on GitHub?
warning
If there is an existing repository on GitHub and you have changes on an unlinked copy, you will have to clone the repo on GitHub, manually bring over your changes to the cloned repo, work out the differences between the two, then upload the changes.
Methods
- Git command
- VSCode UI
Create a repo through Git
-
Open the console
(CTRL + `)
-
Run
git init
Create a repo through VSCode's UI
-
Open
Source Control
on the left. -
Click
Publish to GitHub
. -
Select all wanted files then press Ok.