Last active
December 31, 2015 12:59
-
-
Save MKorostoff/7989809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Suppose we have a file with one function, which we commit in git: | |
function gfc_update_7001() { | |
nbcsports_features_revert( array( "gfc_pathauto_settings" ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Now suppose we add a second function | |
function gfc_update_7001() { | |
nbcsports_features_revert( array( "gfc_pathauto_settings" ) ); | |
} | |
function gfc_update_7002() { | |
nbcsports_features_revert( array( "gfc_news_view" ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//And run 'git diff': | |
function gfc_update_7001() { | |
nbcsports_features_revert( array( "gfc_pathauto_settings" ) ); | |
+} | |
+ | |
+function gfc_update_7002() { | |
+ nbcsports_features_revert( array( "gfc_news_view" ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* The curly bracket on line 5 is regarded as "new," not the curly bracket on line 9. | |
* Lines 5-8 are regarded as the "insertion" when, realistically, lines 6-9 are the insertion. | |
* This matters because, in the event of a merge conflict, it breaks the ability to resolve by | |
choosing 'take from left, then take from right' | |
Question: how can we signal to git that lines 6-9 are the insertion? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment