Open rcisterna opened 2 years ago
If you are open to it, I can help you with this 😁.
I've created a PR that attempts to support this, but with a different strategy. Instead of adding logic to handle different remotes (which I couldn't find a robust way to parse) or adding a config file, this just uses urls instead (as supplied by git ls-remote --get-url
).
@rcisterna I'm not sure if this use case is still relevant to you. But if it is, would you be willing to test if these code changes fix the issue?
Hi @adamtabrams! It's currently not relevant to me, but it will be a pleasure to help you test the changes.
Does the version here behave as you expect for branches with multiple remotes? Also when there's only one remote, but it isn't named origin
?
Existing Problem Currently,
change
only support a remote namedorigin
. So, if I have only one remote with a different name, it fails with an exit code 1, and a message sayingremote origin url isn't set for this repo
.First Solution It would be nice if, instead,
change
worked something like this:change
should use that one.origin
or fail just the way it fails now.CHANGE_REMOTE_NAME
for example), or a.env
like file (that could be called.change
) to select the name of preferred remote.Alternative Solutions I actually don't have any more ideas.
Further Explaination