Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I may be incorrectly interpreting your question, but it sounds like you could make do with either an ours or theirs merge strategy for the file in question. Based on the answer to this questionthis question, you could do the following:

.gitattributes:

file.js merge=ours 

.git/config:

[merge "ours"] name = Keep my file driver = true 

This will always keep your version of the file.

A theirs merge is only slightly more difficult -- you can't just change the driver to false, you need to define a script to keep their changes. The question linked above covers a theirs strategy in more detail.

I may be incorrectly interpreting your question, but it sounds like you could make do with either an ours or theirs merge strategy for the file in question. Based on the answer to this question, you could do the following:

.gitattributes:

file.js merge=ours 

.git/config:

[merge "ours"] name = Keep my file driver = true 

This will always keep your version of the file.

A theirs merge is only slightly more difficult -- you can't just change the driver to false, you need to define a script to keep their changes. The question linked above covers a theirs strategy in more detail.

I may be incorrectly interpreting your question, but it sounds like you could make do with either an ours or theirs merge strategy for the file in question. Based on the answer to this question, you could do the following:

.gitattributes:

file.js merge=ours 

.git/config:

[merge "ours"] name = Keep my file driver = true 

This will always keep your version of the file.

A theirs merge is only slightly more difficult -- you can't just change the driver to false, you need to define a script to keep their changes. The question linked above covers a theirs strategy in more detail.

Source Link
cjc343
  • 3.8k
  • 1
  • 34
  • 36

I may be incorrectly interpreting your question, but it sounds like you could make do with either an ours or theirs merge strategy for the file in question. Based on the answer to this question, you could do the following:

.gitattributes:

file.js merge=ours 

.git/config:

[merge "ours"] name = Keep my file driver = true 

This will always keep your version of the file.

A theirs merge is only slightly more difficult -- you can't just change the driver to false, you need to define a script to keep their changes. The question linked above covers a theirs strategy in more detail.