User Tools

Site Tools


01 Setup

How to setup

1. Create a GitLab User

Go to and create a free account. Then let us know about your username so we can grant you access to our repositories.

2. Install Git

Install git on your development machine.

There's an in-depth description of Working with Git on Windows available at beanstalk. It covers the installation of Git for Windows as well as installing SSH keys.

Git itself is a collection of tools that are operated from the command line (or bash). However, there are GUI clients available for all major operating systems.

3. Configure Git

If you're using a GUI client, some of these settings may be done via its settings dialog.

Git checks 4 places for a configuration file, cascading settings in the following order:

  • Your machine's system .gitconfig file.
  • Your user .gitconfig file located at ~/.gitconfig.
  • A second user-specific configuration file located at $XDG_CONFIG_HOME/git/config or $HOME/.config/git/config.
  • The local repo's config file .git/config.

If you haven't been asked for your name and your email address during installation, you can manually set this information:

  git config --global "Your Name"
  git config --global "your@email.address"

Example .gitconfig file

  	name = Your Name
  	email = your@email.address
  	excludesfile = /some/path/to/.gitignore_global
  	filemode = false

Ignoring files

The exludesfile mentioned in the .gitconfig file (the global .gitignore file) defines which files to ignore (exclude from versioning) for all repositories on the computer its stored on. You can set the path of the global exludesfile to the actual user's home directory with

  git config --global core.excludesfile '~/.gitignore'

Each repository and each directory in it can have its own .gitignore file.

Common .gitignore example
  # Generic: Temporary Files and Logs
Project-specific .gitignore example
  # LabVIEW Metadata
  # LabVIEW Binaries/Builds

Windows Specifics

If you're using msysgit on Windows:

  • the machine's system .gitconfig file resides at %PROGRAMFILES(X86)%\Git\etc\gitconfig.
  • your user ~/.gitconfig file resides at your %HOMEPATH%

Use echo %PROGRAMFILES(X86)% and echo %HOMEPATH% from a Windows command prompt to find the specific locations.

Global .gitignore file

Set the global .gitignore file location to C:/users/{myusername}/.gitignore:

  git config --global core.excludesfile "%USERPROFILE%\.gitignore"

The above command will only set the location of the ignore file that git will use. The file has to still be manually created in that location and populated with the ignore list.

Environment Variables

Open up My Computer → Advanced System Settings → Environment Variables. Then:

  1. Add the git binary path (eg C:\Program Files (X86)\Git\bin) to the PATH environment variable
  2. Add msys to the TERM environment variable
File Permissions

If your repository is on a filesystem whose executable bits are unreliable (like FAT), git should be configured to ignore differences in file modes recorded in the index and the file mode on the filesystem if they differ only on executable bit:

  git config --local core.filemode false


  git config --global core.filemode false
Long Paths

Due to a Windows API limitation of file paths having 260 or fewer characters, Git checkouts fail on Windows with “Filename too long error: unable to create file” errors if a path is longer than the 260 characters.

To resolve this issue, please run the following command from GitBash or the Git CMD prompt:

  git config --system core.longpaths true

4. SSL / SSH

See 06 SSH.

kb/scc/git/setup.txt · Last modified: 2022/01/13 12:26 by joerg.hampel