Use smerge minor mode in emacs to resolve conflicts.
The condition-case is used to suppress errors with emacs versions before 21.
error: pretxncommit.nocommits hook failed: no commits allowed
transaction abort!
rollback completed
abort: no commits allowed
error: pretxncommit.nocommits hook failed: no commits allowed
transaction abort!
rollback completed
abort: no commits allowed