Sha256: 5fca8ca32ec71d8fa821a06125bdfa53411365c3cee84a62ced6a8d5d73da768

Contents?: true

Size: 879 Bytes

Versions: 15

Compression:

Stored size: 879 Bytes

Contents

desc 'Start will create a new feature branch and setup remote tracking'
long_desc <<LONGTIME
  Performs the following:\n
  \t$ git pull origin <current_branch>\n
  \t$ git push origin <current_branch>:refs/heads/[new_feature_branch]\n
  \t$ git checkout --track -b [new_feature_branch] origin/[new_feature_branch]\n
LONGTIME
arg_name '[new-feature-branch-name] - name of the new feature branch'
command :start do |c|
  c.desc 'Describe a switch to list'
  c.switch :s

  c.desc 'Describe a flag to list'
  c.default_value 'default'
  c.flag :f
  c.action do |global_options, options, args|
    if args.empty?
      raise "usage: git-reflow start [new-branch-name]"
    else
      `git pull origin #{GitReflow.current_branch}`
      `git push origin #{GitReflow.current_branch}:refs/heads/#{args[0]}`
      `git checkout --track -b #{args[0]} origin/#{args[0]}`
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
git_reflow-0.6.7 lib/git_reflow/commands/start.rb
git_reflow-0.6.6 lib/git_reflow/commands/start.rb
git_reflow-0.6.5 lib/git_reflow/commands/start.rb
git_reflow-0.6.4 lib/git_reflow/commands/start.rb
git_reflow-0.6.3 lib/git_reflow/commands/start.rb
git_reflow-0.6.2 lib/git_reflow/commands/start.rb
git_reflow-0.6.1 lib/git_reflow/commands/start.rb
git_reflow-0.6.0 lib/git_reflow/commands/start.rb
git_reflow-0.5.3 lib/git_reflow/commands/start.rb
git_reflow-0.5.2 lib/git_reflow/commands/start.rb
git_reflow-0.5.1 lib/git_reflow/commands/start.rb
git_reflow-0.5.0 lib/git_reflow/commands/start.rb
git_reflow-0.4.2 lib/git_reflow/commands/start.rb
git_reflow-0.4.1 lib/git_reflow/commands/start.rb
git_reflow-0.4.0 lib/git_reflow/commands/start.rb