We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b79de3a commit 5572a5aCopy full SHA for 5572a5a
lib/git/base.rb
@@ -264,6 +264,11 @@ def reset_hard(commitish = nil, opts = {})
264
self.lib.reset(commitish, opts)
265
end
266
267
+ def clean(opts = {})
268
+ opts = { :force => true, :d => true }.merge(opts)
269
+ self.lib.clean(opts)
270
+ end
271
+
272
# commits all pending changes in the index file to the git repository
273
#
274
# options:
lib/git/lib.rb
@@ -429,6 +429,13 @@ def reset(commit, opts = {})
429
arr_opts << commit if commit
430
command('reset', arr_opts)
431
432
433
434
+ arr_opts = []
435
+ arr_opts << '--force' if opts[:force]
436
+ arr_opts << '-d' if opts[:d]
437
+ command('clean', arr_opts)
438
439
440
def apply(patch_file)
441
arr_opts = []
0 commit comments