Class: Thegarage::Gitx::Cli::UpdateCommand
- Inherits:
-
BaseCommand
- Object
- Thor
- BaseCommand
- Thegarage::Gitx::Cli::UpdateCommand
- Defined in:
- lib/thegarage/gitx/cli/update_command.rb
Instance Method Summary collapse
Methods inherited from BaseCommand
Methods included from Thor::Actions
Constructor Details
This class inherits a constructor from Thegarage::Gitx::Cli::BaseCommand
Instance Method Details
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/thegarage/gitx/cli/update_command.rb', line 10 def update say "Updating " say "#{current_branch.name} ", :green say "with latest changes from " say Thegarage::Gitx::BASE_BRANCH, :green update_branch(current_branch.name) if remote_branch_exists?(current_branch.name) update_branch(Thegarage::Gitx::BASE_BRANCH) run_cmd 'git push origin HEAD' end |