You can use Git from the command line or you can use one of several GUI-based tools such as Sourcetree. These instructions assume you are using Git from the command-line.
$ git --version git version 1.8.1.3
git config --global user.name "FIRST_NAME LAST_NAME"
Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. Instead of supplying the combination with every HTTP call, you can store these credentials in your OSX keychain provided you have the git-credential-osxkeychain helper added to Git.
The helper asks for your username/password on the first Git operation and then stores the credential. Future operations won't require you to supply a username/password combination. To install the helper, open a terminal window on your local system and do the following:
$ git credential-osxkeychain usage: git credential-osxkeychain <get|store|erase>
If you receive a usage statement, skip to Step 5. If the helper is not installed, go to the next step.
$ curl -O <a href="//github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain"> //github-media-downloads.s3.amazonaws.com/os...</a>
This command downloads the source to a local file called git-credential-osxkeychain. If you don't have curl installed you can use this link.
$ sudo mv git-credential-osxkeychain /usr/local/bin/
$ chmod u+x /usr/local/bin/git-credential-osxkeychain
$ git config --global credential.helper osxkeychain # Set git to use the osxkeychain credential helper
You can use Mercurial from the command line or you can use one of several GUI-based tools such as Sourcetree. These instructions assume you are using Mercurial from the command-line.
$ hg --version
Hg is the chemical symbol for Mercury and hg is the command for mercurial.
ls ~/.hgrc
If for some reason, you don't have the .hgrc file, you should create one yourself using the touch command:
touch ~/.hgrc
Icon
Files that start with a . (period) are hidden files in Mac OSX. By default, the Finder does not show hidden files. There are severaltutorials that show how to show hidden files in finder.
When you are done, the ~/.hgrc file looks something like this:
[ui] # Name data to appear in commits username = Mary Anthony <manthony@atlassian.com>
This is default value Mercurial uses, you can also set this for specific repositories (you'll learn more about this later).