Open vhvb1989 opened 2 months ago
@vhvb1989 can you capture the manual steps for removing the remote and configuring a new one. Just in-case if anyone needs it before we do this enhancement.
Sure.
For listing existing remotes, run git remote -v
The common case is to see one remote with the name origin
following the original template's repository.
For removing that remote, folks would run git remote remove origin
(or use the name of the remote to remove)
Then folks can run azd pipeline config
and let azd to set up a new remote for origin
.
Optionally, if folks needs to keep the current origin
remote, they can run azd pipeline config --remote-name other
to configure a remote with the name other
instead of using origin
.
When you have cloned a repo (or started a codespace) and you project is still tracking a git remote back to that repository, azd would return an error trying to configure that repo (as the user is not the owner).
If you run git remote -v you would see remote origin is set to the source repo.
May be adding a confirmation during azd pipeline config like:
The new option would make azd to remove the remote (divorce your project from the main Sample’s repo) and configure a new one. Azd would add an ENV VAR to skip this prompt after user confirmation (we ideally want it just for the first time).
optionally, we can offer folks to clean all git history.