11. Gitο
11.1. Install Gitο
Download and install git version 2.34.1 (or newer) from https://git-scm.com/. Use all defaults.
11.2. Check installed version of Gitο
From the terminal in VSCode or from the command prompt, check the version of Git that is installed.
Press Win + X + C to open the Command prompt.
From the cmd prompt:
git --version
11.3. Set Git Name & Emailο
When you install Git, set your user name and email address. This is important because every Git commit uses this information, and itβs used in the commits you create.
Press Win + X + C to open the Command prompt.
From the cmd prompt:
git config --global user.name "my-github-name"
git config --global user.email "my-github-email-@address"
From the cmd prompt, check or confirm your settings with:
git config --list
11.4. Git in VSCodeο
Visual Studio Code has git support built in.
For use of git in VSCode see: https://code.visualstudio.com/docs/editor/versioncontrol
For an into video for use in VSCode see: https://www.youtube.com/watch?v=wMqukSKYcvU
The main features are:
See the diff of the file you are editing in the gutter.
The Git Status Bar (lower left) shows the current branch, dirty indicators, incoming and outgoing commits.
You can do the most common git operations from within the editor:
Initialize a repository.
Clone a repository.
Create branches and tags.
Stage and commit changes.
Push/pull/sync with a remote branch.
Resolve merge conflicts.
View diffs.
11.5. Git in PyCharmο
Git can also be used in other IDEs for python such as PyCharm.
See: https://www.jetbrains.com/help/idea/using-git-integration.html
For use of git in PyCharm see: https://www.youtube.com/watch?v=-_g3QITLaQA