VSCode extensions#
Install of Git VSCode extensions#
Click on the Extension button on the left (red box below):
Install the following extensions:
Cloning a repository#
Closing windows#
First, close all the existing windows:
The shortcut is Ctrl K, F
Cloning a repository#
Click on Git extension panel:
Click on the Clone Repository
. Enter the repository address. Add your credentials:
Git status#
To check the status of your Git repository, navigate on the different sections of the Git extension window.
Commit changes#
Looking at changes#
Click on a file that you modified on the "Changes" list:
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:
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.
Push (git push
)#
To push the commited files to the remote repository (git push
command), click on the Sync Changes
button.
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).
Conflicts#
Conflicts: warning message#
In case of a conflict, the following message will show up:
The files in which there is a conflict will appear with a !
symbol
Conflicts: manual merge#
To solve a conflict manually, click on the conflicted files. You will see:
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.
Solving conflicts#
When the conflict is solved, click on the Complete Merge
button and push your changes as shown above