     @pluginActive = false
     @subscriptions.dispose()
     @destroyBindings()
+
+  activateBinding: =>
+    @createBindings() if atom.project.getRepo()?
+
+    @subscriptions.add @asDisposable atom.project.on 'path-changed', =>
+      if atom.project.getRepo()?
+        @createBindings()
+      else
+        @destroyBindings()
 
   createBindings: =>
     @minimapModule.eachMinimapView ({view}) =>

    binding.destroy() for id,binding of @bindings
    @bindings = {}

module.exports = new MinimapGitDiff

{CompositeDisposable, Disposable} = require 'event-kit'
MinimapGitDiffBinding = require './minimap-git-diff-binding'

class MinimapGitDiff
