~/repo$ ls hello.sh* ~/repo$ git branch * master ~/repo$ git branch mybranch ~/repo$ git status # On branch master nothing to commit (working directory clean) ~/repo$ vi hello.sh ~/repo$ git commit -a -m 'added quotes' [master 88bba9c] added quotes 1 files changed, 1 insertions(+), 1 deletions(-) ~/repo$ git checkout mybranch Switched to branch 'mybranch' ~/repo$ vi hello.sh ~/repo$ git commit -a -m 'added comma' [mybranch b146d6c] added comma 1 files changed, 1 insertions(+), 1 deletions(-) ~/repo$ git checkout master Switched to branch 'master' ~/repo$ git merge mybranch Auto-merging hello.sh CONFLICT (content): Merge conflict in hello.sh Automatic merge failed; fix conflicts and then commit the result. ~/repo$ git status # On branch master # Unmerged paths: # (use "git add/rm ..." as appropriate to mark resolution) # # both modified: hello.sh # no changes added to commit (use "git add" and/or "git commit -a") ~/repo$ cat hello.sh #!/bin/bash <<<<<<< HEAD echo "hello git world" ======= echo hello, git world >>>>>>> mybranch ~/repo$ vi hello.sh ~/repo$ cat hello.sh #!/bin/bash echo "hello, git world" ~/repo$ git commit -m "merged mybranch into master"