Created
December 22, 2016 15:24
-
-
Save agross/6a1af5c0de75b274afcb0267270abe5b to your computer and use it in GitHub Desktop.
git cherry-pick adds more lines than expected
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
#!/bin/bash | |
git init | |
echo 1 > file | |
# This is the magic line. | |
echo * merge=union > .gitattributes | |
git add . | |
git commit -m 1 | |
git checkout -b test | |
echo 2 >> file | |
git commit -am 2 | |
echo 3 >> file | |
git commit -am 3 | |
git checkout - | |
# Without merge=union, this results in a conflict. | |
git cherry-pick test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The resulting graph looks like this: