Here are a few articles. Please read them and then ask more specific questions, if needed:
Dynamics Ax Musings: Easy Automated Builds - Part 1
Axilicious: Release Management for VS2013 … and AX : Part 1
Goshoom.NET: Preview of Release Management
Please elaborate what you want to merge, because you mix two different things there. Changesets are not workitems.