$ git config --global user.name "Your Name"
$ git config --global user.email your.email@example.com
$ git config --global core.editor "gvim -f"
First-time repository setup:
Change into the directory that houses your repository (project). Then:
$ git init
Edit .gitignore to tell Git to ignore certain files:
-----
# Ignore bundler config. /.bundle # Ignore the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp # Ignore other unneeded files. database.yml doc/ *.swp *~ .project .DS_Store .idea .secret
-----
[Notes taken from Ruby on Rails Tutorial]