Git resources

Redirection notice

This page will redirect to BitbucketServer:Git resources .

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:

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

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

Git cheat sheets and other resources;

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.

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

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport