Method: Git::Base#push

Defined in:
lib/git/base.rb

#push(remote = nil, branch = nil, options = {}) ⇒ Void

Push changes to a remote repository

Parameters:

  • remote (String) (defaults to: nil)

    the remote repository to push to

  • branch (String) (defaults to: nil)

    the branch to push

  • options (Hash) (defaults to: {})

    options to pass to the push command

Returns:

  • (Void)

Raises:

  • (Git::FailedError)

    if the push fails

  • (ArgumentError)

    if a branch is given without a remote

[View source]

462
463
464
# File 'lib/git/base.rb', line 462

def push(*args, **options)
  self.lib.push(*args, **options)
end