Follow the commands below to do the auto merge the branch in git:
$ git checkout -b {new-branch-name}
$ git merge --no-ff {old-branch-name}
$ git push -u origin {new-branch-name}
Before append: [1, 2]
Shows a & b are same references, after append to b, a: [1, 2, 3]