Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I am not sure Git is meant to be used this way.</p> <p>First a quick <a href="http://www.gelato.unsw.edu.au/archives/git/0701/37960.html" rel="noreferrer">Linus advice</a>, always "colorful" and informative ;)</p> <blockquote> <p>Git <em>very</em> fundamentally tracks project state, not file state. Which means that you very much can NOT try to "merge a file". It is a senseless operation in git, and in fact, any SCM that allows it pretty much is doomed to be a total piece of sh<em>t (</em>).</p> <p>(*) And I'm not saying that just because git doesn't do it. It's much more fundamental than that. Once you start doing per-file branching and merging, you've basically screwed yourself, and you'll never be able to work on the project as a "whole project" any more - you no longer have a well-defined history that actually is the history of the whole project.</p> </blockquote> <hr> <p>There.</p> <p>That said, you could:</p> <ul> <li>manage those config/doc files a separate git sub-projects (note: the <a href="http://markmail.org/message/emzectaqyfdeqmeu" rel="noreferrer">use of submodules has been discussed here</a>)</li> <li>or record partial merge (using "ours" strategy for files we don't want to merge), then --amend it.</li> </ul> <hr> <p>Other solutions in this thread involve working on a "server-specific" branch on your deployment server</p> <pre><code>Development Deployment #origin/master: x--x $ git clone # master x--x $ git checkout -b deployment origin/master x--x \ -- #deployment $ .... #makes changes for config files #or other specific deployment files x--x \ --d1--d2 # no need to push that branch ever. #new developments x--x--x--x $ git pull --rebase #pull origin/master and #replay current branch on top of it x--x--x--x \ --d1'--d2' #SHA1 rewritten in deployment branch #not important since this branch #is not pushed (published) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload