Git

Installation

  • Although Git is coming with the macOS.
  • It is better to install Git using Homebrew.
  • So that it is easier to update using Homebrew.
  • And it is more up-to-date. (the version of the built-in Git is like 2.10.1)
  • If you have just installed Homebrew, open a new terminal tab by pressing keys Cmd+T (so that the binaries installed by Homebrew can be effective)
  • Type the following in Terminal:
    brew install git
    
  • Once the installation finish.
  • Open an new terminal tab by pressing keys Cmd+T, then type:
    git --version
    
  • You should see the output like this:
    git version 2.11.0
    

Global Git Config

  • Let Git to know your user name and email address.
  • Type the followings in Terminal: (Make sure you replace the name and email with yours)

    git config --global user.name "Someone Like to Code"
    git config --global user.email "[email protected]"
    
  • If you are using GitHub and want to keep your email address private, you can specify your email as [email protected]

    • Replace username with your GitHub username

results matching ""

    No results matching ""