Setting up Git

A Brief Intro to Git

First, make sure you can access git from the command line by executing the following command:

$ git --version

You should see something like this:

$ git --version
git version

If instead you see bash: git: command not found, double check you have git installed. [Coming soon: Tutoral on installation and making sure this works.]

Second, configure git to fit you. Instead of a options menu, git is configured through a .gitconfig file in your home directory. You can quickly set it up by copying the following settings into your .gitconfig file:

        name = Firstname Lastname               # Fill this in
        email =                 # Fill this in
        default = matching
        excludesfile = ~/.gitignore_global
        autocrlf = false
        fileMode = false
        editor = code.exe                       # Fill this in
        ui = true
        prompt = false
        st = status
        ci = commit
        ch = checkout
        br = branch -vva
        shortlog = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold yellow)%d%C(reset) %C(white)%s%C(reset)' --all

Double check that your .gitconfig is ready by running this command:

$ cat ~/.gitconfig

The cat command will print the file on your screen. You can also use git config --list.

Next in "A Brief Intro to Git": First Steps: Making Commits