Skip to content

Commit 8f70cc4

Browse files
committed
Added clean command
1 parent 953b8b5 commit 8f70cc4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/git/base.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,10 @@ def current_branch
477477
self.lib.branch_current
478478
end
479479

480-
480+
def clean
481+
puts "cleaning"
482+
self.lib.clean
483+
end
481484
end
482485

483486
end

lib/git/lib.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def initialize(base = nil, logger = nil)
2828
def init
2929
command('init')
3030
end
31+
32+
def clean
33+
command('clean -f')
34+
end
3135

3236
# tries to clone the given repo
3337
#
@@ -103,7 +107,7 @@ def revparse(string)
103107
return File.read(rev).chomp if rev
104108
command('rev-parse', string)
105109
end
106-
110+
107111
def namerev(string)
108112
command('name-rev', string).split[1]
109113
end

0 commit comments

Comments
 (0)