1

Hello I am having Two Branches on Github for the Rails Application.

One is Test and Other is Live.

Problem is Live branch is having the latest changes on it and Test is not having the lates changes.

so I want to transfer the code from Live to test on github.

Both the environment having different Database name and having different deploy.rb file with their environment.

So my concern is how to update the Test environment code with live environment code without changing the database and deploy.rb file.

Please Help me.
Thanks.

urjit on rails
  • 1,763
  • 4
  • 19
  • 36
  • Just to make sure -- you have 2 different repositories (not branches) for live and test? 2nd question: Do they have any similar commits, or do they just have similar code? – Jesse Wolgamott Oct 07 '12 at 19:22
  • Sorry for my wrong words.I have two different branches test and live and both of them having same code and file structure other then two files deploy.rb and database.yml file. – urjit on rails Oct 08 '12 at 05:56

1 Answers1

0

You could put a merge driver which would always keep your local version for those two files (deploy.rb and database.yml).

See as an example "How do I tell git to always select my local version for conflicted merges on a specific file?".
You can declare that merger driver in a .gitattributes file, which mean it will be published from upstream repo to upstream repo (as opposed to a git config solution which would be purely local to your repo)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250