Answer the question
In order to leave comments, you need to log in
How to make sure that there are different versions of files on the local machine and in the git repository?
Ruby on rails 4 project, deploy by capistrano. On ubuntu+nginx+unicorn server. On the local machine windows+thin.
You need to have different gemfile and gemfile.lock on local machine and git.
If you use .gitignore, then the files are removed from git.
Answer the question
In order to leave comments, you need to log in
So far, only the creation of local and deployment branches has come to mind. But you have to switch between them.
But in theory, files shouldn't be deleted unless you do a git rm.
I think it's worth highlighting different groups for each environment (development and production) in one Gemfile. On the local machine use development and on the server production. Read more about it here: bundler.io/v1.5/groups.html
PS The translation is a bit simplified.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question