Git resources
Get started with Bitbucket Data Center and Server
On this page
In this section
Related content
- View and configure the audit log
- How to figure out if a branch was deleted on merge in Bitbucket Server
- Repository notifications
- How to restore a deleted branch
- How to identify a deleted branch
- How to find the commit that introduced an unexpected change in Bitbucket Server and Data Center
- Compare branches, tags, and commits
- Missing Commits in Bitbucket Server
- How to find the commit that introduced an unexpected change in Bitbucket Server and Data Center
- How to find the users and related commits on Bitbucket Data Center
Get Git
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 .mailmap
The Git .mailmap
feature is useful locally, and in Bitbucket Data Center and Server repositories, to map multiple commit identities to the one Bitbucket 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
- View and configure the audit log
- How to figure out if a branch was deleted on merge in Bitbucket Server
- Repository notifications
- How to restore a deleted branch
- How to identify a deleted branch
- How to find the commit that introduced an unexpected change in Bitbucket Server and Data Center
- Compare branches, tags, and commits
- Missing Commits in Bitbucket Server
- How to find the commit that introduced an unexpected change in Bitbucket Server and Data Center
- How to find the users and related commits on Bitbucket Data Center