Created
June 21, 2023 12:48
-
-
Save danstur/04532c268d8663ad935f036be8434b94 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// main - commit 100 | |
void Foo() { | |
Console.WriteLine("My horrible func"); | |
} | |
void Bar() { | |
Foo(); | |
} | |
// longer-living branch from 100 | |
void Foo() { | |
Console.WriteLine("My horrible func"); | |
} | |
void Bar() { | |
Foo(); | |
} | |
void Baz() { | |
Foo(); // we also need Foo and it does exactly what we want! | |
} | |
// main - commit 101 | |
void Foo() { | |
Console.WriteLine("My new awesome func"); | |
} | |
void AwfulFoo() { | |
Console.WriteLine("My horrible func"); | |
} | |
void Bar() { | |
AwfulFoo(); // we made sure to renaem all funcs before creating our new one! | |
} | |
// main - commit 102 when longer-living is merged: | |
void Foo() { | |
Console.WriteLine("My new awesome func"); | |
} | |
void AwfulFoo() { | |
Console.WriteLine("My horrible func"); | |
} | |
void Bar() { | |
AwfulFoo(); // we made sure to renaem all funcs before creating our new one! | |
} | |
void Baz() { | |
Foo(); // No merge conflict because nobody in main changed anything in Baz. | |
// No compile conflict because Foo still exists, but it now calls something else | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment