Closed henvic closed 5 years ago
Ya that happens to me all the time. Hmm what about a --swap
which can be aliased to -s
.
So it would look like gh re --swap "upstreamUrl"
That would be cool if there was a way to programatically get the upstream repo!
On second thought since this isn't really a git tool, but more of a GitHub tool this shouldn't be a feature of gh
.
I have a zsh alias that just runs two commands to make this simple:
function grswap() {
git remote rename origin upstream
git remote add origin $1
}
Sometimes I want to add a remote for a repo I have already forked, and I always have to rename origin with upstream, then add my remote as the origin. This involves copying & paste, replacing the username, and, etc. I want something like 'gh repo --add-me', except that I don't like --add-me for obvious reasons (it's not suggestive).
Do you guys suggest anything?