A period of time to buy a new version of MPB, a variety of environments are not configured, want to search the Internet and grope for a variety of development tools to gradually configure a complete range of problems continue to appear, do not know is not the reason for the new version is incompatible.
The configuration of git is especially strange. The latest version of Git downloaded directly from the GIT website is not installed, and there is no way to run the command to see if it already contains git.
Install the git that came with Xcode
Open the terminal, enter Git--version, and pop up a dialog that says get Xcode (because Xcode comes with git), or cancel or install (click the button to install the git that comes with Xcode).
Here I choose to click Install, then there will be a minute or so waiting for the installation time, after the end of the GIT installation is complete.
Run git--version again and find that the default installed Git is 2.11. version 0
After running the which git command, get git on the path:/usr/bin/git
install a new git version
Here is another way to be blocked by the system can not be properly installed on the official website download the latest git version installed,
It is clear here that the operation is complete, and then everything is installed properly.
One thing to note here: If you run the git--version command at this point, you'll find that the git version you're using is still the previous version (Xcode comes with), but you don't have to ignore it or remove it.
To open the. bash_profile file with the VI command, add the following two words
Execute the Force command again on the terminal source. bash_profile
Look at path to see that the GIT path has been replaced with a new installation, and the view version can be verified.
Questions about configuring Git on a new version of Mac