cd recipes
git branch feature
git switch feature
cat >> recipes.txt <<- EOM
Chocolate Cake
1. Preheat the oven to 350°F (175°C).
2. Mix flour, sugar, cocoa powder, baking powder, and salt in a bowl.
3. Add eggs, milk, oil, and vanilla extract, and mix well.
4. Pour the batter into a greased baking pan.
5. Bake for 30-35 minutes.
EOM
git add recipes.txt
git commit -m "Add chocolate cake recipe to recipes.txt"
git checkout main
cat >> recipes.txt <<- EOM
Vanilla Cake
1. Preheat the oven to 350°F (175°C).
2. Mix flour, sugar, baking powder, and salt in a bowl.
3. Add eggs, milk, oil, and vanilla extract, and mix well.
4. Pour the batter into a greased baking pan.
5. Bake for 25-30 minutes.
EOM
git add recipes.txt
git commit -m "Add vanilla cake recipe to recipes.txt"
git merge feature
sed -i '' -e '/^<<<<<<< /d' -e '/^=======/d' -e '/^>>>>>>> /d' recipes.txt
git add recipes.txt
git commit -m "Resolve merge conflict by adding both chocolate and vanilla cake recipes"
git branch -d feature