Git Hints

Configure your personal git usage

Configure git with (substituting the contact info with your specifics):

git config --global "Full Name"
git config --global ""

We think that color coded diffs and status reports help greatly, therefore we configure:

git config --global color.ui "auto"

If you prefer svn-like shortcuts, also configure the following aliases:

git config --global status
git config --global checkout
git config --global commit -v

How to create a central git repository on one of our group drives

If all your contributors do have a D-PHYS account and access to the same group drive, you can host your Git repository on that group's drive.

The following can be executed on any of our managed Linux machines, or on the terminal server

cd ~<group name>/[<some optional path>/]
mkdir <your project>.git
cd <your project>.git
git init --bare --shared=group

Use the repository as git remote

You can access the repository from anywhere via

git clone <your D-PHYS user name><group name>/[<some optional path>/]<your project>.git

Git on Windows

Git on Windows is often used via Cygwin. Nevertheless the most popular SSH client for Windows is Putty. Putty provides a program called plink.exe which can be used as commandline SSH client. Unfortunately this program does not seem to work properly together with git.

In case you get error messages like

error: cannot run ssh: No such file or directory
fatal: unable to fork


fatal: The remote end hung up unexpectedly

explicitly setting the environment variable GIT_SSH to Cygwin's OpenSSH client may help:

export GIT_SSH=/usr/bin/ssh

See also git push using PuTTY on Windows fails (fatal: The remote end hung up unexpectedly).