     })
 
   @isRebasing: ->
+    return unless @_checkHealth (e) ->
+      atom.notifications.addError e.message
+
     root = @_repoGitDir()
     return false unless root?
 

      handler(new GitNotFoundError, null)

  @checkoutSide: (sideName, filepath, callback) ->
    proc = @process({
      command: GitCmd,
      args: ['checkout', "--#{sideName}", filepath],

        [__, 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

  @withConflicts: (handler) ->
    return unless @_checkHealth(handler)

    conflicts = []
    errMessage = []

