File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,11 @@ def reset_hard(commitish = nil, opts = {})
264
264
self . lib . reset ( commitish , opts )
265
265
end
266
266
267
+ def clean ( opts = { } )
268
+ opts = { :force => true , :d => true } . merge ( opts )
269
+ self . lib . clean ( opts )
270
+ end
271
+
267
272
# commits all pending changes in the index file to the git repository
268
273
#
269
274
# options:
Original file line number Diff line number Diff line change @@ -431,6 +431,13 @@ def reset(commit, opts = {})
431
431
arr_opts << commit if commit
432
432
command ( 'reset' , arr_opts )
433
433
end
434
+
435
+ def clean ( opts = { } )
436
+ arr_opts = [ ]
437
+ arr_opts << '--force' if opts [ :force ]
438
+ arr_opts << '-d' if opts [ :d ]
439
+ command ( 'clean' , arr_opts )
440
+ end
434
441
435
442
def apply ( patch_file )
436
443
arr_opts = [ ]
You can’t perform that action at this time.
0 commit comments