I’ve finally given in to peer pressure and switched to using Git for version control[^1]. For some reason, I’d been hanging on to Mercurial, and even using hg-git to interact with GitHub. Well, I’m done with all that, but I already miss using hg addremove to automatically add untracked files and mark missing ones as removed. So thanks to thesetwo posts, I added an alias to my .profile to replicate the addremove functionality in Git as git-addremove:

Update 9/3/2011: The above alias did not work on my new system. Apparently, the version of xargs that ships with OS X doesn’t support the --no-run-if-empty option. I must have installed the GNU version of xargs on my old system at some point, which does support that option. Anyway, here’s a new version that should workanywhere:[^2]