I have a rails 3 application in local. I created reposority and i know the basics of git like git. I am using git for heroku but i haven’t push my application to public place before. What i want to learn is :
- Which files should i add to git ignore? Because i have some personal passwords and keys in environments.rb and also have some keys in initializers.
- If i add some files in git ignore, i guess it will be a problem for people who clones it, because some files will be missing.
- I will also keep on working on my application, i can always add new keys to environment.rb or somewhere else. Do i have to clone(branch) my application? I heard something “branch, master” but i have no idea about these terms?
The idea of gitignore is that often there are temporary files, or files that are specific to your IDE. They add nothing to source code, and sometimes they contain sensible information about your machine that you probably don’t want to share.
This repo on github is a nice collection of gitignore templates:
https://github.com/github/gitignore
Rails template is available: https://github.com/github/gitignore/blob/master/Rails.gitignore
EDIT
If you have files with you current configuration, which are important for your app, remove all the sensitive information from them, check them in, and after that modify gitignore file.
If you have already checked in a file with passwords, use this manual: http://help.github.com/removing-sensitive-data/