Versions
- 9.4
- 9.3
- 9.2
- 9.1
- 9.0
- 8.19
- 8.18
- 8.17
- 8.16
- 8.15
- 8.14
- 8.13
- 8.12
- 8.11
- 8.10
- 8.9
- 8.8
- 8.7
- 8.6
- 8.5
- 8.4
- 8.3
- 8.2
- 8.1
- 8.0
- 7.21
- 7.20
- 7.18
- 7.19
- 7.17
- 7.16
- 7.15
- 7.14
- 7.13
- 7.12
- 7.11
- 7.10
- 7.9
- 7.8
- 7.7
- 7.6
- 7.5
- 7.4
- 7.3
- 7.2
- 7.1
- 7.0
- 6.10
- 6.9
- 6.8
- 6.7
- 6.6
- 6.5
- 6.4
- 6.3
- 6.2
- 6.1
- 6.0
- 5.16
- 5.15
- 5.14
- 5.13
- 5.12
- 5.11
- 5.10
- 5.9
- 5.8
- 5.7
- 5.6
- 5.5
- 5.4
- 5.3
- 5.2
- 5.1
- 5.0
- See all
Git resources
Get started with Bitbucket Server
On this page
In this section
Related content
- No related content found
Get Git
On this page:
Learning Git
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 behavior 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 behavior 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 Bitbucket Server repositories, to map multiple commit identities to the one Bitbucket Server user – this can be used to tidy up your Git histories.
The Git documentation for .mailmap
has configuration details (see the "MAPPING AUTHORS" section).
In this section
Related content
- No related content found