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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -