Working with GitHub Basic Commands in Visual Studio Code - PART-1

PART-1: CLONE, ADD A FILE, COMMIT MESSAGE, CREATE A LOCAL BRANCH

Working with GitHub Basic Commands in Visual Studio Code - PART-1

In this article, we are going to see GitHub basic commands in Visual studio code. Before going to that first we need to know the answers to these questions

  1. What is Github?
  2. What is Visual Studio Code?

What is GitHub?

GitHub is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management functionality of Git, plus its own features.

What is Visual Studio Code?

Visual Studio Code is a source code editor that can be used with a variety of programming languages, including Java, JavaScript, Go, Node.js, Python and C++. Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle.

Download From Here โฌ‡๏ธDownload_Visual_studio_code

Before using the basic commands in VS-CODE we need to install these two extensions

1. GitLens

GitLens is the best GitHub extension in visual studio code.

GitLens GitLens simply helps you better understand code. Quickly glimpse into whom, why and when a line or code block was changed.

GitLens

2. Gitgraph

Git Graph extension is track user's activity

Gitgraph View a Git Graph of your repository and easily perform Git actions from the graph. Configurable to look the way you want!

GitGraph

GitLens and Gitgraph Preview

Github Commands.png

Git Graph VS Code Extension Preview

This is PART-1 in this series- In this article, I perform 5 basic commands using VSCode and give a command snippet below

Github basic commands using visual studio code

Cloning a Git repository in visual studio code:

The Easiest way to Cloning a Git repository in visual studio code

git-clone.gif

command

git clone repo_url

E.X: git clone https://github.com/dhanar98/github-commands-in-visualstudio-code.git

Add a single file using Github using visual studio code

Adding a file in the GitHub repository

git_add_single_file.gif

command

git add file_name

E.X: git add index.html

Adding all files in GitHub using visual studio code

git_add_all_files.gif

Add all files at the same time for the commit.

command

git add .

Commit the files in visual studio code:

commit all your changes in visual studio code without command only give commit message in the source control panel to move your files to changes to staged changes

Commit-the-code.gif

command

git commit -m "commit message"

E.X: git commit -m "initial commit"

Create a local branch in Visual studio code

The Easiest way to create a local branch click the current local branch name in the bottom left corner and click the option create a new branch to give the branch name.

create-new-branch-in-vscode.gif

command

git branch new_branch

E.X: git branch new-branch

These Basic 5 Github commands using VSCode definitely help everyone. I Hope!!! In PART-2 we see another 5 commands using VSCode. Follow and Support.๐Ÿ’œ

randalyn-hill-.jpg

Did you find this article valuable?

Support Dhanasekaran Ravichandran by becoming a sponsor. Any amount is appreciated!

ย