Open
Description
We have this code below where we remove remote (origin) before adding a new one. From time to time, Add would fail with remote already exists. Is there an issue where remote is not removed when calling repo.Network.Remotes.Remove? Is it a race condition? We doubt it is since rerun the same code still yield remote already exists. Anything we do wrong or can improve? BTW, if we run git remote remove origin command, then it is removed - so repo is not corrupted.
repo.Network.Remotes.Remove(_remoteAlias);
// Configure the remote
remote = repo.Network.Remotes.Add(_remoteAlias, remoteUrl, refSpec);
Metadata
Metadata
Assignees
Labels
No labels