<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -89,18 +89,21 @@ Main {
 
         * removes metadata from .braids
         * removes the local directory and commits the removal
-        * does NOT remove the git and git svn remotes in case you still need them around
+        * removes the git remote by default, --keep can be used to supress that
     TXT
 
     examples &lt;&lt;-TXT
       . braid remove local/dir
     TXT
 
-    mixin :argument_path, :option_verbose
+    mixin :argument_path, :option_verbose, :option_keep_remote
 
     run {
+      options = {
+        :keep =&gt; keep
+      }
       Braid.verbose = verbose
-      Braid::Command.run(:remove, path)
+      Braid::Command.run(:remove, path, options)
     }
   }
 
@@ -226,5 +229,13 @@ Main {
     }
   }
 
+  mixin(:option_keep_remote) {
+    option(:keep) {
+      optional
+      desc 'do not remove the remote'
+      attr
+    }
+  }
+
   run { help! }
 }</diff>
      <filename>bin/braid</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Braid
   module Commands
     class Remove &lt; Command
-      def run(path)
+      def run(path, options = {})
         mirror = config.get!(path)
 
         bail_on_local_changes!
@@ -20,6 +20,16 @@ module Braid
           commit_message = &quot;Removed mirror '#{mirror.path}'&quot;
           git.commit(commit_message)
           msg commit_message
+
+          if options[:keep]
+            msg &quot;Not removing remote '#{mirror.remote}'&quot;
+          elsif git.remote_url(mirror.remote)
+            msg &quot;Removed remote '#{mirror.path}'&quot;
+            git.remote_rm mirror.remote
+          else
+            msg &quot;Remote '#{mirror.remote}' not found, nothing to cleanup&quot;
+          end
+
         end
       end
     end</diff>
      <filename>lib/braid/commands/remove.rb</filename>
    </modified>
    <modified>
      <diff>@@ -185,6 +185,11 @@ module Braid
         true
       end
 
+      def remote_rm(remote)
+        invoke(:remote, &quot;rm&quot;, remote)
+        true
+      end
+
       # Checks git and svn remotes.
       def remote_url(remote)
         key = &quot;remote.#{remote}.url&quot;</diff>
      <filename>lib/braid/operations.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e93a41bac4a76e0224d5dec453494a6f39673d73</id>
    </parent>
  </parents>
  <author>
    <name>Piotr Banasik</name>
    <email>piotr.banasik@gmail.com</email>
  </author>
  <url>http://github.com/evilchelu/braid/commit/9b36d06167449d94b0f6dc219f4f2e71f2de8825</url>
  <id>9b36d06167449d94b0f6dc219f4f2e71f2de8825</id>
  <committed-date>2008-11-19T17:56:44-08:00</committed-date>
  <authored-date>2008-11-19T17:56:44-08:00</authored-date>
  <message>added remote removal on a braid remove
added an extra option to remove (--keep) to not remove the remote</message>
  <tree>d18d671c1884a86498eee4b0e8771a18b04cb136</tree>
  <committer>
    <name>Piotr Banasik</name>
    <email>piotr.banasik@gmail.com</email>
  </committer>
</commit>
