Working with GitHub

GitHub is a fantastic version control service that provides hosting for your git repositories. I end up using it every so often, but not nearly as much as I should. This results in a need to re-lookup a tutorial everytime I decide to use it. Thus, this post will be my own tutorial for next time, and is based on the Repository "SimpleQuine".

  1. Setup the Repository on GitHub
  2. Create the directory on the local machine mkdir SimpleQuine
  3. Move into the directory and initialize it cd SimpleQuine; git init
  4. Connect it to GitHub git remote add origin https://github.com/rarmknecht/SimpleQuine.git
  5. Double check that you're connected git remote -v
  6. Pull down the latest files in the repo (probably just the auto-generated README.md and LICENSE file) git pull
  7. Work with the master branch git checkout master
  8. Add in all the files I was working with cp ~/quine/* ./; git add *
  9. Verify the changes by checking the status git status
  10. Commit the changes git commit
  11. Push the changes up to the remote server git push

A few useful global configuration settings are:

git config --global user.name "rarmknecht"
git config --global user.email "<snipped>"
git config --global credential.helper cache
git config --global core.editor "vim"

Resources used include:
- Lauren Orsini - GitHub Part 1
- Lauren Orsini - GitHub Part 2
- Setting the Default Git Editor
- GitHub Password Caching