B
B
badcluster2013-12-07 21:39:59
git
badcluster, 2013-12-07 21:39:59

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

2 answer(s)
A
Alexander Baumgertner, 2013-12-07
@badcluster

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.

A
Arkady Butermanov, 2013-12-07
@Arkadey

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 question

Ask a Question

731 491 924 answers to any question