All the tutorials i've seen till now shows to first create a repository on github, copy the link go to vscode and git clone
it and from that on, you can do commits and pushes.
Is that the right way ? can't I just start a project from vscode and then upload it to my git ?
You can now do it right inside vscode! just follow these steps:
1- Open your new project folder with vscode
2- click on the source conrol menu on the sidebar (or press Ctrl+Shift+G)
4- From there just login and follow the instructions and you're good to go.
@Debu's answer details every step, so you can jump to there
Well, It's quite easy.
Open your local project.
Add a README.md
file (If you don't have anything else to add yet)
Click on Publish on Github
Choose whether you want your repo to be private or public
Choose the files you want to include in first commit.
Note: If you don't select a file or folder it will added to .gitignore
file
You are good to go. it is published.
P.S. If this was your first time a prompt will ask for for your Github Credentials. Fill those in and you are good to go. It is published.