Word Count: 200
  • Post category:Codings
  • Post last modified:2024-01-24

Introduction

This article describes how to use VSC to work with GitHub for version control. All Git operations are done using the built-in functions of VSC.

Reference

How to use

  • U : untracked, meaning not added to repository.
  • + : the plus sign next to the file. If clicked, the file is added to repository.
  • A : indicates the the file is added to repository.
  • The tick mark at the SOURCE CONTROL row is to commit the changes. Before that the commit message has to be input.
  • To create another branch – Call the command line (F1), enter “create branch” and enter new branch name.
  • Colors at gutter – Green is added new line, Shaded blue is changed line, Red arrow is deleted line.
  • Click on the file name – a comparsion between before and after changes. If open the 3 dots on top right and select “inline view”, the comparsion is consolidated in one file.
  • To merge new branch to the main branch – go to main branch, click 3 dots on left panel, select Branch -> merge branch -> select which branch to merge.

Publish to GitHub

  • Clich button “Publish Branch”, go through the authorization process.