Skip to content

Git setup guide

Get the recommended tools for your Windows computer to be ready for Git and Gitlab. This guide walks you through getting the recommended tools for a git-based workflow on a Windows computer.

terminal

There are graphical interfaces for Git, but it's a command line tool at its core. People often use both interfaces side by side in combination. Even if you prefer the GUI, you should be able to run Git from the command line.

Windows Terminal is Microsoft's modern Windows 10 app for running command lines. It provides multiple tabs, custom command lines, more intuitive key bindings, color schemes etc. Please install Windows Terminal from the Windows Store.

UMR Gitlab

NOWA uses the gitlab service offered for the members of Philipp's University of Marburg. Please login to gitlab with your UMR account and 2FA token. In order to authenticate git with Gitlab, please create a personal access token in your account's preferences. This token will be used for Git operations in place of your account password. See [Git Security] to learn more about configuring authentication with git.

Git for Windows

Please download and install the newest release of Git for Windows. When you go through the installer, please adjust the following settings:

  • Activate the “Add a Git Bash Profile to Windows Terminal” component
  • Choose a default text editor which is installed on your computer. Git uses this editor to ask for text input, if it is run from command line. If you're in doubt, simply choose Notepad.
  • Select “Override the default branch name for new git repositories” and leave the input field set to “main”

Running Git commands

  • In Windows Terminal, open a new tab by selecting Git Bash from the dropdown (CTRL + Shift + Space).
  • If you don't have Windows Terminal, open Git Bash from Windows menu.
  • You should see the Bash command line with the dollar prompt. Try these commands to check if it's working:
  • git --version
  • type git --ver and tab to see if tab completion works. The line should be replaced with git --version.
  • You can set Git Bash as the default command line via Settings from dropdown or CTRL+,.

Graphical Git Interface

Please download and install Git Tower, the graphical interface used in this course, on your computer. Please adjust these settings when you proceed through the setup assistant:

  • Select the trial version
  • Please enter your proper name and email, because these are added to your contributions when you work with Git, they can't be changed afterwards, and they can be visible to others if you share your work

You can add Gitlab as a service via Services -> Gitlab CE/E. Please enter these settings:

Authentication
Personal Access Token
Host
https://gitlab.uni-marburg.de/
Username
Your UMR Username
Personal Access Token
Your generated PAT

[Git Security]: {{< relref "../../../tutorial/git-security" >}}