How to realise a deployment branch in Git -


I'm using git for a PHP project, I think it's really easy. The one thing that I get to work with is very good.

I have created a branch, which is for deployment. There are some differences in it, such as different configuration files and documentation.

I can not ignore them, because then they both will be in the branches, while I would like to keep them separate in both the branches.

The problem is that when I merge the branches, then the files are separated which are also merged

Is there any easier to accomplish such a task? The way? How is this done normally?

I'm not sure that the meaning of Git is done in this way.

The guitar lot tracks the position state basically, rather than the file states it means that You can not try to "merge the file" This is a stupid operation in git, and in fact, it allows any SCM which is too much t () is the total piece of .

(*) And I'm not saying that just because git does not do that. This is a lot more fundamental than that when you start to merge the branches of each file and you've basically spoiled yourself, and you have never done anything on the project as a "whole project" You will not be able to work - now you do not have a well-defined history which is actually a history of the whole project.


There.

He said, you can:

  • Manage those configurations / DOCs a separate GIT sub-project files (note: d)
  • Or record partial merge (we do not want to merge using "our" strategy for files), then allow it -.

Other solutions in this thread include working on your deployment server on a "server-specific" branch

  development deployment # Master: x- -x $ git clone # master x - x $ git checkout -b deployment original / master x - x \ - #degirement $ .... # Changes to the config file # or other specific deployment files X-X \ - D1 - D2 # does not need to push that branch anytime. # New development x - x - x - x $ git pull --rebase #pull orig / master and #replay f On the top of the branch, the rewritten # is not important in the X-x-x-x \ -d1 '-D2' # SAHA 1 deployment branch because this branch # is not pushed (published)  
< / Div>

Comments