Method: Git::Lib#remote_add

Defined in:
lib/git/lib.rb

#remote_add(name, url, opts = {})

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1382
1383
1384
1385
1386
1387
1388
1389
1390
# File 'lib/git/lib.rb', line 1382

def remote_add(name, url, opts = {})
  ArgsBuilder.validate!(opts, REMOTE_ADD_OPTION_MAP)

  flags = build_args(opts, REMOTE_ADD_OPTION_MAP)
  positional_args = ['--', name, url]
  command_args = ['add'] + flags + positional_args

  command('remote', *command_args)
end