Are there git hooks for sanitize private information in Rails project to push to a public git repository?
-
I want to be able to share the code publicly, but some settings are private. How do I set it up to sanitize the private information, and push it up to a public repository.
-
Answer:
Actually, thereâs a much simpler way than using hooks. Put the private settings into a separate file. You can include the separate file into your main settings file with the ruby load statement or similar. Then add the separate file to http://git-scm.com/docs/gitignore and donât check it into the repository. The problem with trying to do this with hooks is that it would basically amount to maintaining two distinct parallel histories. Youâll just confuse everyone that has to interact with that setup. Keeping your secrets in a separate file (or even a separate repository) is best practice, and it really is the simpler solution.
Anders Kaseorg at Quora Visit the source
Other answers
Could you expose private information through environment variables? It's what heroku does: http://devcenter.heroku.com/articles/config-vars
Sam Neubardt
Related Q & A:
- What's the difference between a private franchise and a public franchise?Best solution by answers.yahoo.com
- Is Crazy John a public or private company?
- What is the difference between a private company and a public company?Best solution by Yahoo! Answers
- What's the difference between a private and a public college?Best solution by differencebetween.net
- Is my GPA public or private information?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.