more "git-merge` without conflicts
let's attempt a new merge, this time we won't have conflicts.
let's create a new branch:
git branch new-modification
then let's checkout into this branch:
git checkout new-modification
Now delete the first line, change the second line to "this is a modification", and add a smiley face at the end. The editor should look like this:
let's stage and commit our new file:
git add . git commit -m "this is a new modification"
Now let's check back out to our master branch:
git checkout master
Now we are ready to merge:
git merge new-modification
>> Updating 6da90de..fd36bee Fast-forward project-1.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The output tells us that 1 file received two insertions and 2 deletions without any conflicts.
This merge is also reflected in our history:
Deleting our branch
We don't need the new-modification branch anymore, we can simply delete it:
git branch -d new-modification
>> * master
Only our master branch shows, we successfully deleted our new-feature branch.