diff --git a/grgit-core/src/main/groovy/org/ajoberstar/grgit/operation/RemoteRemoveOp.groovy b/grgit-core/src/main/groovy/org/ajoberstar/grgit/operation/RemoteRemoveOp.groovy
new file mode 100644
index 00000000..571e9fd4
--- /dev/null
+++ b/grgit-core/src/main/groovy/org/ajoberstar/grgit/operation/RemoteRemoveOp.groovy
@@ -0,0 +1,34 @@
+package org.ajoberstar.grgit.operation
+
+import java.util.concurrent.Callable
+
+import org.ajoberstar.grgit.Repository
+import org.ajoberstar.grgit.internal.Operation
+import org.eclipse.jgit.lib.Config
+
+/**
+ * Removes a remote from the repository.
+ * @see grgit-remote
+ * @see git-remote Manual Page
+ */
+@Operation('remove')
+class RemoteRemoveOp implements Callable {
+
+ private final Repository repository
+
+ /**
+ * Name of the remote.
+ */
+ String name
+
+ RemoteRemoveOp(Repository repo) {
+ this.repository = repo
+ }
+
+ @Override
+ Void call() {
+ Config config = repository.jgit.repository.config
+ config.unsetSection("remote", name)
+ config.save();
+ }
+}
diff --git a/grgit-core/src/main/groovy/org/ajoberstar/grgit/service/RemoteService.groovy b/grgit-core/src/main/groovy/org/ajoberstar/grgit/service/RemoteService.groovy
index 9eb19d61..299a08c6 100644
--- a/grgit-core/src/main/groovy/org/ajoberstar/grgit/service/RemoteService.groovy
+++ b/grgit-core/src/main/groovy/org/ajoberstar/grgit/service/RemoteService.groovy
@@ -4,6 +4,7 @@ import org.ajoberstar.grgit.Repository
import org.ajoberstar.grgit.internal.WithOperations
import org.ajoberstar.grgit.operation.RemoteAddOp
import org.ajoberstar.grgit.operation.RemoteListOp
+import org.ajoberstar.grgit.operation.RemoteRemoveOp
/**
* Provides support for remote-related operations on a Git repository.
@@ -17,9 +18,10 @@ import org.ajoberstar.grgit.operation.RemoteListOp
*
* - {@link org.ajoberstar.grgit.operation.RemoteAddOp add}
* - {@link org.ajoberstar.grgit.operation.RemoteListOp list}
+ * - {@link org.ajoberstar.grgit.operation.RemoteRemoveOp remove}
*
*/
-@WithOperations(instanceOperations=[RemoteListOp, RemoteAddOp])
+@WithOperations(instanceOperations=[RemoteListOp, RemoteAddOp, RemoteRemoveOp])
class RemoteService {
private final Repository repository
diff --git a/grgit-core/src/test/groovy/org/ajoberstar/grgit/operation/RemoveRemoveOpSpec.groovy b/grgit-core/src/test/groovy/org/ajoberstar/grgit/operation/RemoveRemoveOpSpec.groovy
new file mode 100644
index 00000000..9ecdc4ab
--- /dev/null
+++ b/grgit-core/src/test/groovy/org/ajoberstar/grgit/operation/RemoveRemoveOpSpec.groovy
@@ -0,0 +1,14 @@
+package org.ajoberstar.grgit.operation
+
+import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec
+
+class RemoveRemoveOpSpec extends SimpleGitOpSpec {
+ def 'remote with given name is removed'() {
+ given:
+ grgit.remote.add(name: 'newRemote', url: 'http://fetch.url/')
+ when:
+ grgit.remote.remove(name: 'newRemote')
+ then:
+ [] == grgit.remote.list()
+ }
+}