Git Guide For People New to Git

Installing GIT

  • mac: $brew install git or use the graphical install at
  • linux: $apt-get install git-core or $yum install git-core
  • windows:

Configuring GIT

  • $ git config –global “Your Name”
  • $ git config –global

Getting files from our repository

  • The first time, do: $git clone git://
  • Afterwards: $git pull

Checking in files (just do it and don’t be nervous about it!)

  • $git add .
  • $git commit
    • You should see a screen that shows you the files you’ll be checking in. Make sure they are correct, and then type in a message that describes your changes. For example, “Changed the readme file to explain the install process on windows.” or “Added geocaching to the locations controller.”
  • or to quickly add everything and type your message in one shot, you can use the command: $git commit -a -m “Message goes here”
  • $git push

Creating a new project

  • $git init
  • $git add .
  • $git commit

Adding forgotten files to a commit

  • $ git commit -m ‘initial commit’
  • $ git add forgotten_file
  • $ git commit –amend

Comments are closed.