Versioning tools#
Version control is one of the most important best practices when programming in any language. It allows you to track changes, collaborate with others, and maintain a history of your work.
Git#
Git is the most widely used version control system today. It is a powerful tool, although it can be somewhat challenging and potentially unsafe, especially for beginners. Git installation is optional for this training, but recommended for your future work.
Download and install from https://gitforwindows.org/.
# this should already have been done, so Git should already be available
xcode-select --install
Alternately, you could install Git with:
brew install git
sudo apt install git
Meld#
Meld is a graphical diff and merge tool that integrates seamlessly with both Git and Mercurial. It provides a visual interface for comparing files, reviewing changes, and resolving merge conflicts, tasks that are much easier to understand visually than through command-line output.
While Meld installation is optional for this training, it significantly improves your version control workflow. Once you start using version control regularly, you’ll find Meld invaluable for understanding what changed in your code and handling complex merges.
Download and run the installer from https://meldmerge.org/.
brew install --cask meld
sudo apt install meld
Mercurial#
Mercurial is the version control system used for this training’s repository, so it is highly recommended to install it to access the source code.
Mercurial is similar to Git but offers some advantages: a simpler, more consistent command interface, enhanced safety (no destructive operations), and excellent performance for large repositories. While Git has become the standard for open-source projects (GitHub, GitLab), Mercurial remains widely used in companies and offers powerful features for collaborative development.
TortoiseHg (which includes Mercurial and useful extensions) can be installed using WinGet:
winget install TortoiseHg.TortoiseHg -e --accept-package-agreements
Alternatively, you can download an installer and run it to install TortoiseHG.
To install Mercurial with important extensions:
uv tool install "mercurial<7" --with hg-git,hg-evolve,certifi -p 3.13
DO NOT USE this method on Windows!
Configure Mercurial
After installation, create a reasonable default configuration with:
uvx hg-setup init