How To Use GitHub with VS Code in 2020 | Commit & Push | Part 1

Dev World

Learn how to commit and push a repository on Github using VS Code without the terminal.

Download GIT
https://git-scm.com/downloads

Playlist Github & VS Code
https://www.youtube.com/playlist?list=PLpPVLI0A0OkLBWbcctmGxxF6VHWSQw1hi

— 🤙 Book A Consultation —
https://dev-world.agency/web-dev-consultation

CONTACT:
📱 Facebook – https://www.facebook.com/devworldinfo
🌎 Website – https://www.dev-world.info
📧 Email – contact@dev-world.info

VIDEO SCRIPT:
Today I’m gonna show you how to efficiently use github with vs code without the terminal we all secretly dislike.

In this video, we are going to focus on how to add an existing vs code project to git and GitHub and how to update the files afterward with just a couple of mouse clicks.

First of all, you have to install git on your system, git is the underlining technology which powers Github.

Secondly, make sure to have an account on Github and that you have vs code installed.
Just a quick check, in the beginning, make sure that under settings git enable is checked.

A little side note: Github is a version control platform to save existing projects and to work on projects in a team. But you probably already knew that.

So let’s start with the first step.
Open an existing project with vs code.

Go to the source control menu and click the git icon and choose your project folder. If you have the folder open in vs code, it should appear right away.

Now the files that are not updated with git appear with this U for “”””””.

To upload the files we go through a two-step process. Commit and Push.

To commit, write a descriptive message of the changes, this is our first commit so we say init, and click the checkmark.

Now the files are committed.

The next step will be to push the changes to GitHub. But if we try to do it we will get this error message. That’s why we have to add a remote repository first.

Go to view and “command palette” and choose “add remote” first give it a name, usually, I chose the same name of the project which in our case would be Test_Project.

And now vs code asks you for the link to the repository.

So let’s go and create a new repository in GitHub.

Give it a name… you either can have it as a public repository so anyone can see it, or keep it private though this is behind a paywall, so we keep it public.
You can add a README to your repository, which should have a quick description of your project, this is good practice in GitHub, so you should do it but for the sake of this tutorial we leave it out.

Then we create the respiratory and we copy the link. Put the link in vs code and now we are able to push the changes to GitHub either in this menu section, or I prefer this symbol here.

Now the files appear on your GitHub.

If I make some changes it will automatically appear in the source control menu section.

We commit it with a comment and push it to GitHub.

And that’s all there is to it.

Now you can sync your updated files with just a couple of clicks to GitHub via vs code. Also, don’t forget that git created a hidden file in your local folder. So don’t accidentally delete it and don’t make any changes.

Another tip, if form one reason or another you have to get your GitHub repository link again this is how to get it

In the next video which is in the description down below, I’m going to show you how to do it the other way around, so if you have an existing project on Github, how to pull it to vs code.

ABOUT THIS CHANNEL:
Dev World is a mix of tutorials and educational videos around Coding, Online Marketing, and Design.

#Coding #Webdesign #Marketing