Ruby on Rails Development with Git and Github

This tutorial shows you how to setup your Ruby on Rails development environment to use git and github. This serves as a prerequisite to our server deployment series.

We cover setting up your SSH keys, configuring your github account, creating your git repository and pushing your code to github.

Here are the commands used in the tutorial.

# create an SSH key and give it a strong password
ssh-keygen -t rsa

# Add your public ssh key to github
cat .ssh/

# test github connection
ssh -T

# configure git
git config --global "Creston Jamison"
git config --global
git config --global push.default simple

# review .gitignore and make changes if necessary
cd apps/testapp
ls -al
more .gitignore

# create local git repository
git init

# add files and commit to the local repository
git add .
git commit -m "first commit"

# add a github repository as a remote called origin
git remote add origin

# push your local changes to the master branch on the origin remote
git push -u origin master

Please go ahead and leave a comment below if you have any questions about this tutorial.