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 f9c9ce7 commit 11a8137Copy full SHA for 11a8137
lib/git/base.rb
@@ -281,7 +281,12 @@ def reset_hard(commitish = nil, opts = {})
281
end
282
283
284
- # cleans the working directory, removing directories, too.
+ # cleans the working directory
285
+ #
286
+ # options:
287
+ # :force
288
+ # :d
289
290
def clean(opts = {})
291
self.lib.clean(opts)
292
lib/git/lib.rb
@@ -422,8 +422,10 @@ def reset(commit, opts = {})
422
423
424
425
- arr_opts = ["--force"] # Some configurations require a --force
426
- arr_opts << ["-d"] # Remove untracked directories in addition to untracked files.
+ arr_opts = []
+ arr_opts << '--force' if opts[:force]
427
+ arr_opts << '-d' if opts[:d]
428
+
429
command('clean', arr_opts)
430
431
0 commit comments