Changing the remote url of a repository in libgit2sharp -
how can change remote url of repository?
using (var repository = new repository(repositorypath)) { //change remote url first //then checkout }
how can change remote url of repository?
var newurl = "https://github.com/owner/my_repository.git";"; remote remote = repo.network.remotes[name]; // update remote configuration, persist // , return new instance of updated remote remote updatedremote = repo.network.remotes.update(remote, r => r.url = newurl);
for it's worth, of remote properties can updated following same pattern. feel free take peek @ remotefixture.cs test suite more detailed examples.
Comments
Post a Comment