Class: Gitx::Cli::CleanupCommand
- Inherits:
-
BaseCommand
- Object
- Thor
- BaseCommand
- Gitx::Cli::CleanupCommand
- Defined in:
- lib/gitx/cli/cleanup_command.rb
Instance Method Summary collapse
Methods included from Thor::Actions
Instance Method Details
#cleanup ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gitx/cli/cleanup_command.rb', line 9 def cleanup update_base_branch say 'Deleting local and remote branches that have been merged into ' say config.base_branch, :green filtered_merged_branches(:remote).each do |branch| run_git_cmd 'push', 'origin', '--delete', branch end filtered_merged_branches(:local).each do |branch| run_git_cmd 'branch', '--delete', branch end end |