Created
December 30, 2018 13:23
-
-
Save JanosSarkoezi/43dcb6e388a5a5e54e61b83da8142188 to your computer and use it in GitHub Desktop.
Beispie für ein git merge konflikt
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
rm -fr test | |
mkdir -p test | |
cd test | |
git init | |
cat > Test.java <<END | |
pubic void Test { | |
public Test() { | |
String s=""; | |
} | |
publi void myAwesomeFunction() { | |
return; | |
} | |
} | |
END | |
cat > README <<END | |
This is a README file. | |
Adding myAwesomeFunction in Test class. | |
END | |
git add . | |
git commit -m "initial commit" | |
git branch feature | |
git checkout feature | |
cat > Test.java <<END | |
pubic void Test { | |
public Test() { | |
String s = ""; | |
s.toString(); | |
} | |
publi void myAwesomeFunction() { | |
return; | |
} | |
public void doNothing() { | |
return; | |
} | |
} | |
END | |
cat > README <<END | |
This is a README file. | |
Adding doNothing in Test class. | |
END | |
git add . | |
git commit -m "added toString and a function doNothing" | |
git checkout master | |
cat > Test.java <<END | |
pubic void Test { | |
public Test() { | |
String s=""; | |
s.toUpperCase(); | |
} | |
publi void myAwesomeFunction() { | |
return; | |
} | |
public boolean isSomewath() { | |
return true; | |
} | |
} | |
END | |
cat > README <<END | |
This is a README file. | |
Adding isSomewath in Test class. | |
END | |
git add . | |
git commit -m "added toUpperCase and a function isSomewath" | |
git merge feature |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment