0% found this document useful (0 votes)
14 views6 pages

Case Study Git

This document provides a step-by-step guide for installing and using Git in Visual Studio Code. It includes instructions for downloading Visual Studio Code, opening a folder, using the terminal, and executing common Git commands such as initializing a repository, staging files, configuring user details, committing changes, and pushing to a remote repository. Additionally, it mentions the requirement of a personal access token for pushing to a remote repository.

Uploaded by

shrutimanval104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

Case Study Git

This document provides a step-by-step guide for installing and using Git in Visual Studio Code. It includes instructions for downloading Visual Studio Code, opening a folder, using the terminal, and executing common Git commands such as initializing a repository, staging files, configuring user details, committing changes, and pushing to a remote repository. Additionally, it mentions the requirement of a personal access token for pushing to a remote repository.

Uploaded by

shrutimanval104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

GIT in Visual Studio Code

Visual Code Installation

Step1: To download Visual Studio Code go to the below-mentioned link

https://code.visualstudio.com/download

Step2: Select Visual Code for Windows/Mac to download and Install Vs Code.

Select the open folder option to open a folder in which we need to work.

Open a folder

Step3: Once we open a folder, we can see the name of the folder on the left side.

Step4: We can create a new file or open an existing one.


We have selected a folder

Step5: Select the terminal option to open a PowerShell terminal.

Select the Terminal option to open a PowerShell terminal


The path highlighted in the below image refers to the directory in which we need to work.

The path refers to a gitdemo folder in which this terminal is open

Common git commands


git init : this command will initialise the working directory into a git working directory.
git add demo.txt : this command will stage the file demo.txt

Note: before making a commit, we need to configure the user detail.


git config --global user.email "user_email” : this command will configure the email address
of the user.

git config --global user.name "demo_user" : this command will configure the username.
git commit -m “message” : this command will commit the staged files or folders to local
repository.

git remote add origin <URL of git repository> : This command will link the remote
repository to the directory.

git push origin master : this command will push the files in the local repository to remote
repository.
Select the token option to use personal
access token

Note: we need to enter the token to push to remote repo.

The files have been pushed to remote repository.

You might also like