   # @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))

  # returns filepath relativized for either a submodule or repository
  #   otherwise just a full path
  relativize: (path) ->
    git.getSubmodule(path)?.relativize(path) ? atom.project.getRepositories()[0]?.relativize(path) ? path

  # Returns the working directory for a git repo.
  # Will search for submodule first if currently
