-
Notifications
You must be signed in to change notification settings - Fork 15
Configuring Git
abhikp edited this page Aug 3, 2011
·
7 revisions
Git is pretty easy to setup. You'll need to run a few commands to get up and running.
-
Setup your name and email. Git attaches this info to every commit you make. If it's not set it will attempt to determine it from the system (so set it!).
% git config --global user.name "Your Name" % git config --global user.email "[email protected]"If we use GitHub, GitHub will associate the commit to the account that has an email that matches
user.email. -
Create a global
.gitignorein your home directory.% touch ~/.gitignoreThe
.gitignoreis populated with regexes of filepaths to ignore in every git workspace. Mine's populated with:.DS_Store *.swp *.swo *.logYou can also place a .gitignore file in a directory and Git will use it to ignore files in that directory and sub-directories.
-
If you like colored higlighting you'll have to turn it on.
git config --global color.ui auto