Installing and Configuring Git
If you have never used git or github before, have a read of our Git crashcourse. Before you get started, however you must install and configure git on your computer.
Install Git
Install git following the instructions on their website.
Consider installing a graphical front-end to git: it can greatly simplify your git workflow. The following three popular options run on Windows, Mac and Linux. Many other GUI options are listed on the git website.
You do not have to limit yourself to a single tool: because of the way Git works on your computer, you can use any or all of these simultaneously. Each tool has it's benefits, so you may find yourself quite naturally using each one to its strength.
-
The standard Git install, linked above, installs Git GUI, which though minimal is good at what it does, especially if you use the "Visualize All Branch History" viewer launched from the Repository menu. On Windows the option to "Open Git Gui here" is added to the right-click menu for folders in the File Explorer.
-
SmartGit adds a fair bit of functionality and ease-of-use especially for keeping up with changes in the main repository and organizing multiple repositories. It is free for use with public (open-source) repositories.
-
Visual Studio Code (VS Code), the IDE we recommend, also provides some integrated git management, which can be enhanced with various plugins such as GitLens, Git History, and Git Graph.
-
GitHub Desktop works well in simple cases and integrates well with GitHub.
Configure Git
Companion’s prettier config requires eol=lf, but the system default (in C:/Program Files/Git/etc/gitconfig) may have set autocrlf to true during installation.
In order for git clone to give you lf endings, i.e. before you have even downloaded the repository, this default needs to be overridden before you clone the companion repository. In a git bash window type:
git config set --global core.autocrlf false
git config set --global core.eol lf