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

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -