   # @param andSubmodules boolean determining whether to account for submodules
   dir: (andSubmodules=true) ->
     new Promise (resolve, reject) =>
-      if andSubmodules and submodule = @getSubmodule()
+      if andSubmodules and submodule = git.getSubmodule()
         resolve(submodule.getWorkingDirectory())
       else
-        @getRepo().then (repo) -> resolve(repo.getWorkingDirectory())
+        git.getRepo().then (repo) -> resolve(repo.getWorkingDirectory())
 
   reset: (repo) ->
-    @cmd(['reset', 'HEAD'], cwd: repo.getWorkingDirectory()).then () -> notifier.addSuccess 'All changes unstaged'
+    git.cmd(['reset', 'HEAD'], cwd: repo.getWorkingDirectory()).then () -> notifier.addSuccess 'All changes unstaged'
 
 }
 


  unstagedFiles: (repo, {showUntracked}={}) ->
    args = ['diff-files', '--name-status', '-z']
    @cmd(args, cwd: repo.getWorkingDirectory())
    .then (data) ->
      if showUntracked
        gitUntrackedFiles(repo, _prettify(data))

  stagedFiles: (repo, stdout) ->
    # args = ['diff-index', '--cached', 'HEAD', '--name-status', '-z']
    args = ['diff-index', '--cached', 'HEAD', '--name-status']
    git.cmd(args, cwd: repo.getWorkingDirectory())
    .then (data) ->
      _prettify data
    .catch (error) ->
