Sha256: 6bc53b96d1399206ee1ae7815229762941b10d0a4a031a8b5b19b51c2fa0f6a9

Contents?: true

Size: 752 Bytes

Versions: 5

Compression:

Stored size: 752 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.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

5 entries across 5 versions & 1 rubygems

Version Path
git_reflow-0.7.5 lib/git_reflow/commands/start.rb
git_reflow-0.7.4 lib/git_reflow/commands/start.rb
git_reflow-0.7.2 lib/git_reflow/commands/start.rb
git_reflow-0.7.1 lib/git_reflow/commands/start.rb
git_reflow-0.7.0 lib/git_reflow/commands/start.rb