     proc.process.on 'error', (err) ->
       callback(new GitNotFoundError)
 
-  @add: (filepath, callback) ->
-    return unless @_checkHealth(callback, filepath)
+  @add: (repo, filepath, callback) ->
+    return unless @_checkHealth(callback)
 
     @process({
       command: GitCmd,
       args: ['add', filepath],
-      options: { cwd: @_repoWorkDir() },
+      options: { cwd: repo.getWorkingDirectory() },
       stdout: (line) -> console.log line
       stderr: (line) -> console.log line
       exit: (code) ->

        [__, indexCode, workCode, p] = m
        handler(indexCode, workCode, p)

  @_checkHealth: (callback, filepath) ->
    unless GitCmd
      console.trace("GitBridge method called before locateGitAnd")
      callback(new Error("GitBridge.locateGitAnd has not been called yet"))
      return false

    unless @getActiveRepo(filepath)
      callback(new Error("No git repository detected"))
      return false

    return true

    proc.process.on 'error', (err) ->
      handler(new GitNotFoundError, null)

  @checkoutSide: (repo, sideName, filepath, callback) ->
    return unless @_checkHealth(callback)

    proc = @process({
      command: GitCmd,
      args: ['checkout', "--#{sideName}", filepath],
      options: { cwd: repo.getWorkingDirectory() },
      stdout: (line) -> console.log line
      stderr: (line) -> console.log line
      exit: (code) ->
