need some help! Have problems with cherry-pick. I create *.sh file with the following sequencing (execute in empty folder!):
#!/bin/sh
git init
echo "init" >> file.txt && git add . && git commit -m "commit init"
git checkout -b develop
for i in $(seq 1 8)
do
echo $i >> file.txt && git add . && git commit -m "commit $i" && git tag v$i
done
git checkout master
git checkout -b some_other_branch
git cherry-pick v5
If you execute it, you find it in conficting state during the cherry-pick. That fact is ok for me, but if you open file file.txt you find there all changes 1,2,3,4,5, not as I expected only 5.
init
<<<<<<< HEAD
=======
1
2
3
4
5
>>>>>>> 0ea6510... commit 5
But I want to see only 5 as a diff.
init
<<<<<<< HEAD
=======
5
>>>>>>> 0ea6510... commit 5
How can I manage to do it? Maybe I shall set diff some additional properties?