Install and set up Git
Git is a DVCS that transfers code between your local system and Bitbucket Cloud.
Step 1. Install Git
git --version at the command line to check if you already have Git installed.
Depending on your operating system:
- For Windows: Download the Git installer. To open a command window, go to Git Bash.vbs from the Git folder of the Programs directory.
- For Mac: Download the Git installer. To open a command window, search for the Terminal.
- For Linux: Enter
sudo apt-get install gitat the command line. To verify installation was successful, enter
Step 2. Update your configuration file
When you install Git, it comes with a configuration file that you update with your personal settings from a command window.
Enter the following command to configure your username, replacing Emma's name with your own. (Copy and paste the line after the
$and press enter.)
$ git config --global user.name "Emma Paris"
Enter the following command to configure your email address, replacing Emma's email address with your own.
$ git config --global user.email "firstname.lastname@example.org"
Configure Git to handle line endings properly so that Bitbucket doesn't think files have changed when the actual content hasn't changed. We recommend this setting if you're collaborating on repositories with others who have different operating systems.
$ git config --global core.autocrlf true
For Mac and Linux
$ git config --global core.autocrlf input