If you host your Git repository on Github you may consider using the Github API for merge automation. The main benefit is that you won’t need a local repository. Instead all operations are done on the Github servers. If I caught your attention, take a look at my project on Github. Feel free to use, fork or tear it to pieces to match your own needs. The script is based on the ruby flavour of Octokit.