We need to use Git to upload our code and keep versions of it and calibrating with others in writing code.
Most serious Ruby on Rails developers keep a copy of their code at Git Hub. The free access keeps code public, a model to encourage open source software development, If you need your app to be private you can open a paid private account.
You will have to copy and paste the key of your rails project to your account.
Actually, when you install a Rubyonrails installer for windows, you will get the key. If you don’t have it, please follow these instructions
As per the tutorials am currently doing (am watching the videos not the book…you can buy them from the same site. Trust me they are worth the price. (an am not affiliated in anyway)). and forgive the ugly website layout and the “spammy” feel. It is not.
– There is a .gitignore file in your app folder, where it indicates which files needs to be ignored by git. (think of it like a backup system which need to know which files need not to be included in the sync operation)
Change your .gitignore file content to this. It is the recommended and used one by Michael Hartl.
You can also use this one, frequently updated made by the rails community on github
# See http://help.github.com/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global # Ignore bundler config /.bundle # Ignore the default SQLite database. /db/*.sqlite3# Ignore all logfiles and tempfiles. /log/*.log /tmp# Ignore other unneeded files. doc/ *.swp *~ .project .DS_Store .idea
The tutorial teaches basic commands from the git command line.
These are the basics:
– $ git add . (this will add all files listed in the directory we are running the command from, to be included in the further pushing commit, push, pull requests)
$ git commit -m “Initial commit”
$ git status
$ git push -u origin master
$ git remote add origin email@example.com:railstutorial/first_app.git
I will not go through all details of git in this post.. but if you want to save your time of learning GIT command. You can cheat and use
the Github Windows Client. Am not installing it. At this stage I prefer to learn the commands. It will be easier later for me to understand the ins and outs of the clients
PS: If you feel too serious about learning Git system. Then this the most recommended book and its online for free.