Last active
December 28, 2015 21:29
-
-
Save dkirrane/7565273 to your computer and use it in GitHub Desktop.
Gist to reproduce https://netbeans.org/bugzilla/show_bug.cgi?id=238423
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
#!/bin/sh | |
## | |
# Run this from GitBash | |
## | |
mvn archetype:generate -B -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=pom-root -DarchetypeVersion=1.1 -DgroupId=com.mycompany -DartifactId=Bug238423 | |
cd Bug238423 | |
git init | |
git add -A | |
git commit -m "Initial project" | |
git checkout -b myBranch | |
sed -i 's/1.0-SNAPSHOT/1.1-SNAPSHOT/g' pom.xml | |
git commit -a -m "myBranch commit" | |
git commit --allow-empty -m "Some other commit" | |
touch someFile.txt | |
echo hello world >> someFile.txt | |
git add -A | |
git commit -m "Commiting someFile" | |
git checkout master | |
sed -i 's/1.0-SNAPSHOT/1.2-SNAPSHOT/g' pom.xml | |
git commit -a -m "master commit" | |
git merge myBranch | |
## | |
# List files with merge conflicts | |
## | |
echo "Merge Conflicts:" | |
git diff --name-only --diff-filter=U | |
## | |
# Once you get the merge conflict message from above open the pom.xml file in NetBeans | |
# Then run the following from Git Bash | |
# git checkout --theirs pom.xml | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment