# File lib/git-up.rb, line 7
  def run(argv)
    process_args(argv)

    command = ['git', 'fetch', '--multiple']
    command << '--prune' if prune?
    command += config("fetch.all") ? ['--all'] : remotes

    # puts command.join(" ") # TODO: implement a 'debug' config option
    system(*command)
    raise GitError, "`git fetch` failed" unless $? == 0
    @remote_map = nil # flush cache after fetch

    Grit::Git.with_timeout(0) do
      with_stash do
        returning_to_current_branch do
          rebase_all_branches
        end
      end
    end

    check_bundler
  rescue GitError => e
    puts e.message
    exit 1
  end