Git in Visual Studio Code — Understanding Git training

In this video, I show you how to use git versioning inside the Visual Studio Code editor.

00:00 Basic operation
03:50 Smartcommit
05:40 Dealing with conflict
09:30 Git graph extension
11:10 GitLens extension

Practical preferences

It is also possible to improve your experience with git within git with some interesting options.

  • "git.confirmSync": falseallows you to disable the confirmation message when you want to synchronize the repository (push or pull)
  • "git.enableSmartCommit": trueactivates the smartCommit system which allows you to automatically stash files when trying to commit without having to stash a file
  • "git.mergeEditor": trueenables the merge editor to handle conflicts.

Useful extensions

In addition to the basic functionalities of the extensions allow to add useful functionalities.

  • git graph generates a graph allowing to go back in the history of the project.
  • GitLens adds file information like annotations to know who edited certain lines.