how to install and update git mac terminal

Shell
$ brew update && brew upgrade	ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
	
Source

Also in Shell: