Method: Git::Base#push
- Defined in:
- lib/git/base.rb
#push(remote = 'origin', branch = 'master', opts = {}) ⇒ Object
pushes changes to a remote repository - easiest if this is a cloned repository, otherwise you may have to run something like this first to setup the push parameters:
@git.config('remote.remote-name.push', 'refs/heads/master:refs/heads/master')
344 345 346 347 348 349 |
# File 'lib/git/base.rb', line 344 def push(remote = 'origin', branch = 'master', opts = {}) # Small hack to keep backwards compatibility with the 'push(remote, branch, tags)' method signature. opts = {:tags => opts} if [true, false].include?(opts) self.lib.push(remote, branch, opts) end |