Skip to content

VSCode extensions#

Install of Git VSCode extensions#

Click on the Extension button on the left (red box below):

Install of VSCode extensions

Install the following extensions:

Git extension pack

Git Graph

git flow

Cloning a repository#

Closing windows#

First, close all the existing windows:

Closing windows

The shortcut is Ctrl K, F

Cloning a repository#

Click on Git extension panel:

Extension button for Git

Click on the Clone Repository. Enter the repository address. Add your credentials:

Cloning a repository

Git status#

To check the status of your Git repository, navigate on the different sections of the Git extension window.

Commit text box, changes list and graph

Commit, branches and remote list

Commit changes#

Looking at changes#

Click on a file that you modified on the "Changes" list:

List of changes

The changes are displayed on the right panel. Le left panel shows file as it is in HEAD.

Stage (git add)#

To add the files to the index (git add command), click on the + button:

Git add

Commit (git commit)#

To commit the staged files (git commit command), fill the text box with a commit message and click on the Commit button.

Git commit

Push (git push)#

To push the commited files to the remote repository (git push command), click on the Sync Changes button.

Git push

Pull (git pull)#

To pull a repository, click on the ... button (in red below) and click on the Pull button. Enter your credentials (login and password).

Git pull

Conflicts#

Conflicts: warning message#

In case of a conflict, the following message will show up:

Conflict message

The files in which there is a conflict will appear with a ! symbol

Merge message

Conflicts: manual merge#

To solve a conflict manually, click on the conflicted files. You will see:

Solving conflicts manually

VSCode also provides a Merge Editor (button at the bottom right of conflicted files)

Conflicts: merge editor#

On the top-left, you will see the incoming version (from the remote). On top-right, the actual (local) one. Below, the merge result. There are buttons that allow to choose one version or merge both versions in any order.

Conflict merge editor

Solving conflicts#

When the conflict is solved, click on the Complete Merge button and push your changes as shown above

Solved conflicts