Blog #17: Visual Studio Code & Git, Commit & Push

Visual Studio has a shortcut that allows user to commit and push projects onto GitHub.

Step 1: Go to setting, search git enabled to ensure that Git is enabled on Visual Studio Code.

Figure 18.1: Search git enabled.

Step 2: Click on source control, then click on Initialize Repository.

Figure 18.2: Initialize Repository.

Step 3: Enter a commit message, then click on the check mark.

Figure 18.3: Commit.

Step 4: Click on View, then Command Palette

Figure 18.4: Command Palette…

Step 5: Search “add remote” in the Command Palette, and Git: Add Remote should show up, click on that.

Figure 18.5: Git: Add Remote…

Step 6: Click on Add remote from GitHub.

Figure 18.6: Add remote from GitHub.

Step 7: Go to GitHub and create a new repository. For this project, I called mine Resume.

Step 8: Find the right GitHub repository, the click on it.

Figure 18.7: Find the right GitHub repository.

Step 9: Provide a remote name, I called mine Resume, press Enter.

Figure 18.8: Provide a remote name.

Step 10: Click on icon that looks like a recycle symbol at the bottom-left corner to push the project to GitHub.

Figure 18.9: Push.

If I want to upload files exclude downloaded packages from node_modules folder. Create .gitignore file at the home directory, then put node_modules in it.

Leave a comment

Design a site like this with WordPress.com
Get started