- Check current version of Git
- Install Brew
- Use Brew to install Git
- Subsequently use Brew to upgrade Git
Also very helpful, a brief overview of common Git commands
- git config
- git init - Initializes the current directory with all the git goodness. Basically it adds a hidden .git folder to your directory to maintain all the changes, repo information and commit history. (Start with this command if you are creating an entirely new project)
- git add - Adds a file, or multiple files, to the staging area
- git commit - Commits changes to the local repo, you can only commit files that were previously added with the add command.
- git status - Shows you the files that have changed, or are the same, between your working branch and staging area and what needs to be committed.
- git remote - Connects a local repo to a remote repo, such as github, bitbucket, sourceforge, or a private git server. Managed list of publicly hosted Git sites.
- git clone - Create a local working copy of a remote repo. (Use this command if you are pulling down someone else's project (from github))
- git pull - Pull down the latest copy of files is on the remote repo, such as github.
- git push - Use this command to "push" you local commits up to the remote repo