         else
           callback(null, String(result).trim())
 
-    docsRepoArgs = ['--work-tree=../atom-docs/', '--git-dir=../atom-docs/.git/']
-
     commitChanges = (sha, callback) ->
       cmd = 'git'
-      args = [docsRepoArgs..., 'commit', '-a', "-m Update API docs to #{sha}"]
+      args = [docsRepoArgs..., 'commit', "-m Update API docs to #{sha}"]
       grunt.util.spawn({cmd, args, opts}, callback)
 
     pushOrigin = (args..., callback) ->

  grunt.registerTask 'deploy-docs', 'Publishes latest API docs to atom-docs.githubapp.com', ->
    done = @async()

    copyDocs = (args..., callback) ->
      cmd = 'cp'
      args = ['-r', 'docs/api', '../atom-docs/public/']
      grunt.util.spawn({cmd, args, opts}, callback)

    fetchSha = (args..., callback) ->

      args = [docsRepoArgs..., 'push', 'heroku', 'master']
      grunt.util.spawn({cmd, args, opts}, callback)

    grunt.util.async.waterfall [fetchTag, copyGuides, copyApiDocs, stageDocs, fetchSha, commitChanges, pushOrigin, pushHeroku], done
