Here are two ways of doing it;
One, using Git command-line
Second, the use of GUI tools Sourcetree, the function is very powerful, very convenient
Before installing, git, like SVN, needs to create a server that can create its own version Management Server. For individuals and small teams, it may be more appropriate to use a managed server,
Common to have GitHub and bitbucket. Here I introduce the next bitbucket,github because there is no personal free warehouse use, the code put up is open source, so here I choose BitBucket. In addition, now BitBucket's personal warehouse related pages have been basically Chinese. The registration process is also relatively straightforward.
See links; https://bitbucket.org/
here is the first introduction to using command-line.
1, download git installer, address; http://git-scm.com/downloads
2, open after download, double-click. PKG Installation
3, open the terminal, use the git--version command to view the installation version, there is a successful installation
/* The following 4.5 commands are automatically included if they have already been created using BitBucket */
4, create a global user name
git config--global user.name "first_name last_name"
5, create a global mailbox
git config--global user.email "[email protected]"
6, if you do not want to enter the remote repository each time the password, enter the following command
Git credential-osxkeychain
------> Wait
git config--global credential.helper osxkeychain
# Set git to use the Osxkeychain credential helper
The installation is complete at this git.
How to install Git to Mac OS X