I was expecting a merge conflict when I tried to merge a branch into master. Both of these branches have a text file with different text in them.
# make project directory
mkdir projA
cd projA
# initialize git repo
git init
# make commit in master branch
echo "text 1" > fileA.txt
git add .
git commit -m "commit A"
# make commit in a new branch
git checkout -b branch1
echo "text 2" > fileA.txt
git add .
git commit -m "commit B"
# merge branch into master
git checkout master
git merge branch1
But the merge command simply does a fast-forward merge and keeps the text that was present in the txt file of brach1 and not the master branch.
Can somebody please explain to me why did git not throw a merge conflict?