Skip to content

Getting Started: Using Git

Stefan Seefeld edited this page Dec 17, 2018 · 2 revisions

Being able to use the Git version control system is a prerequisite for working with the Modular Boost repositories. This page gets you started!

For specific instructions on trying modular boost: Getting Started.

Required Git Release

1.7.3 or later.

To find the version number of Git once it is installed, do this from the default command line for your system:

git --version

Other command line processors will probably work, but we only test with the default, such as bash on Linux, and cmd.exe on Windows.

If you have an earlier Git release installed, please upgrade it.

Installing Git

If you plan to do the Git Immersion Tutorial, it includes links to installation downloads. Downloads are available for various platforms.

Windows

TortoiseGIT, a port of TortoiseSVN, is recommended for Windows users who prefer a GUI interface or already use TortoiseSVN.

Windows hint: If you install TortoiseGIT, avoid incompatibilities by using the Windows command line version of Git that TortoiseGIT installs. I.E. place C:\Program Files (x86)\Git\cmd in your path ahead of any other git binaries, such as those cygwin might install. While in theory you could run git from bash, Windows Powershell, or other shells, examples in these Boost documentation pages are tested only with the regular Windows command line, cmd.exe.

Windows hint: To generate GitHub SSH authentication keys, as described in GitHub help, be sure to use C:\Program Files (x86)\Git\Git Bash. Otherwise the .ssh directory may not get generated in your HOMEPATH directory, and GitHub authentication will fail.

Unix, Linux, etc.

Linux GUI interfaces are enumerated at the wiki page for GIT.

gitk and git gui are the most responsive and common tools. To start using them just execute "gitk ." (without quotes) in folder with cloned GIT repo. git gui can be started from gitk, via "File"->"Start git gui".

Linux hint: You need to create SSH keys and add them to your git account, as described in GitHub help

Mac OS X

Learning to use Git

You need to learn how to use Git from the command line even if you plan to use Git via a graphical client or your IDE:

  • Learning and other communication about Git almost invariably uses CLI commands to describe a Git operation.
  • You will need use the command line to read or write scripts involving git.

Recommended learning and reference resources:

  • Git and GitHub Videos: Interesting and authoritative, as you would expect from Scott Chacon.
  • Git Immersion Tutorial: A deep dive into Git.
  • Git Quick Reference: "... a quick reference for learning and remembering the most important and commonly used Git commands."] Recommended for those who like to cut to the chase. Examples use a POSIX style command line interpreter, but Git works identically under the Windows command line so that should not be a problem for most Boost developers.
  • Pro Git: Scott Chacon's online book is recommended both for learning about Git and as a reference.
  • Power Your Workflow With Git: Patrick Hogan's video introduction to Git and GitFlow?-based workflow. Recommended for those who want to know what is going on under the covers, why Git is the way it is, and recommended workflows. The slides are also available.
  • The Getting Started with Modular Boost Library Development using Git page has links related to Git Flow, the recommended workflow for Boost library developers.

Git Links