r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
148 stars 32 forks source link

Option to set two remotes? #128

Open robitalec opened 3 years ago

robitalec commented 3 years ago

If I want to mimic the following git commands

git remote set-url origin --push --add https://github.com/robitalec/test
git remote set-url origin --push --add https://github.com/robitalec/test2

with gert

library(gert)

git_remote_set_pushurl(
    url = 'https://github.com/robitalec/test',
    remote = 'origin',
    repo = "."
)

git_remote_set_pushurl(
    url = 'https://github.com/robitalec/test2',
    remote = 'origin',
    repo = "."
)

It replaces the first remote URL with the second URL. This is expected, because we didn't provide the --add flag. I'm wondering if there's a way to include the --add flag in git_remote_set_pushurl so both URLs added to the git config?

Thanks!