Here are a pair of aliases I have in my gitconfig, taken from the git wiki:
edit-unmerged = \ "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"add-unmerged = \ "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
Should do what you want!