Once you have Visual Studio Code under your fingers, all you need is git! With git, you can work organized in the cloud! Allow me to illustrate this workflow.
Create or log into a GitHub account
If you already don’t have a GitHub account, create one by filling in the Sign Up form on https://github.com
Create a new repository
Creating a new repository is easy, just click on the + in the top right on the webapge. You can do this from Terminal as well, if interested.
Select a short and memorable repository name like, git-hub-website for example and let’s skip the description for now. Do not create a README just yet and for liscence is usually use MIT, if it makes sense. This is not legal advice. Learn more about repository licenses.
Create folder then initialize git
Use ‘pwd’ or Print Working Directory to see what directory you are currently in.
Create a workinging folder that will contain your projects.
Use ‘ls’ to see the contents of your current directory, you should see git-hub-project then ‘cd’ to change directory into it-hub-project, like this:
Once you are in, initial git like this:
You can check the git status like this:
Clone the new repository
You are ready to clone the repository you just created. Type:
Check the status
Creating READMEs is an art so I suggest you just read this README to learn how to create your own README. To get started, and while in the git-hub-website folder, type:
To edit this file in the current directory, open the command palette in Visual Studio Code with (⇧⌘P) and type ‘shell command’ to find the Shell Command: Install ‘code’ in PATH command. To start editing files in that folder, type:
Once you have created and saved your README.md file, go ahead and push that into your repository in GitHub.
git add .
This adds all files. You could have just typed:
git add README.md
if you wanted to only add one file, again, up to you.
Now, go ahead and type:
git commit -m "initial commit"
This will “commit” your changes and the flag -m stands for message which you can type “within quotes” like, “initial commit” since it’s your first commit, for example.
Last but not least:
git push origin master
This will push your files into your GitHub repo! Congrats!
MIT © Jonathan Barrios