Questions about configuring Git on a new version of Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.