merge function

Merge a branch into HEAD