Skip to content
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.

  1. 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.

  2. Create a global .gitignore in your home directory.

    % touch ~/.gitignore
    

    The .gitignore is populated with regexes of filepaths to ignore in every git workspace. Mine's populated with:

    .DS_Store
    *.swp
    *.swo
    *.log
    

    You can also place a .gitignore file in a directory and Git will use it to ignore files in that directory and sub-directories.

  3. If you like colored higlighting you'll have to turn it on.

    git config --global color.ui auto
    

Clone this wiki locally