Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Added with_track option (-t <branch>) to remote_add #40

wants to merge 1 commit into from

2 participants

Gabriel Cardoso Roberto Decurnex
Gabriel Cardoso


Needed this feature

Good job with this gem !


Roberto Decurnex

It will work with :track =>
It will also support :fetch => true


Tim Morgan RISCfuture referenced this pull request from a commit
Tim Morgan RISCfuture Merge remote-tracking branch 'schacon/master'
* schacon/master: (38 commits)
  Re-enabling travis for every ruby implementation
  TempFile changes to support JRUBY
  trying  jruby build
  raise expects the stacktrace to be an array.
  --no-color as default for log commands.
  Removing duplications
  Re-enabling ruby 2.0.0 and ruby-head on travis.
  Cleaning up warnings  * unused local variables  * redefined methods on the same file and class
  Updating g.add doc
  Adding support for :all option on Git::Base#add and Git::Lib#add Adding tests
  Adding tests over #remove for remotes.
  Adding #remove_remote to Git::Base (adding some tests too)
  Removing jruby and ruby 2 from travis until we fix related issues with the tests.
  Removing old doc (it's working now) closes #42
  Validating tmp_path before try to create the directory on #in_temp_dir (test helpe) closes #66
  Setting up git user name and email before tests (if they are not present)
  Adding :track => <branch_name> and :fetch => true option to add_remote Adding tests too closes #40
  Removing ruby-prof from the gemfile (problems with cext) updating .travis.yml
  Adding test for #clone with :config options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/git/lib.rb
1  lib/git/lib.rb
@@ -528,6 +528,7 @@ def conflicts # :yields: file, your, their
def remote_add(name, url, opts = {})
arr_opts = ['add']
arr_opts << '-f' if opts[:with_fetch]
+ arr_opts << '-t' << opts[:with_track] if opts[:with_track]
arr_opts << '--'
arr_opts << name
arr_opts << url
Something went wrong with that request. Please try again.