Class: Flux::CLI::Branch

Inherits:
Thor
  • Object
show all
Defined in:
lib/flux/cli/git.rb

Defined Under Namespace

Classes: Checks

Constant Summary collapse

B =
Flux::Git::Branch

Instance Method Summary collapse

Instance Method Details

#create(branch_id, options = {}) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/flux/cli/git.rb', line 25

def create(branch_id, options = {})
  up     = B.remote(branch_id, 'origin')
  parent = B.local(options[:parent_branch])
  branch = B.local(branch_id).
    create(parent).
    publish(up).
    track(up).
    checkout
end