# Stash Latest (2.9) : Git resources

Added by pwatson , edited by pwatson on Aug 14, 2013

## Get Git

Mac: http://code.google.com/p/git-osx-installer/downloads/list?can=3

Linux: http://book.git-scm.com/2_installing_git.html

Ubuntu Linux: https://launchpad.net/~git-core/+archive/ppa

Windows: Full installer for official Git for Windows

On this page:

## Learning Git

Git Tutorials and Training

Basic Git commands

## Getting started

One "gotcha" when starting with Git is the way in which it pushes branches by default. On older versions of Git, pushing without arguments would push all branches that have the same name both locally and remotely. This can result in unexpected behaviour if you have old branches that complain when the remote branch is updated. It can even be quite dangerous if you do a force push and it reverts changes on the server. You can see the current value by running:

    git config push.default

If this value is blank or 'matching', it is our recommendation that you reconfigure it to use 'upstream'.

    git config --global push.default upstream

There has been some discussion around changing the default behaviour of Git.

## Git cheat sheets and other resources

http://rogerdudler.github.com/git-guide/

http://byte.kde.org/~zrusin/git/git-cheat-sheet-medium.png

http://nvie.com/posts/a-successful-git-branching-model/

http://zrusin.blogspot.com.au/2007/09/git-cheat-sheet.html

http://ndpsoftware.com/git-cheatsheet.html#loc=workspace;

http://blog.fournova.com/2011/06/git-cheat-sheet/

http://jan-krueger.net/development/git-cheat-sheet-extended-edition

## Git .mailmap

The Git `.mailmap` feature is useful locally, and in Stash repositories, to map multiple commit identities to the one Stash user – this can be used to tidy up your Git histories.

Incidentally, `.mailmap` can also help to manage Stash licenses - as described in this KB article.

The Git documentation for `.mailmap` has configuration details (see the "MAPPING AUTHORS" section).