Something went wrong. Try again.
Rewrite git remotes programmatically
Something went wrong. Try again.
Files
- Shell 100%
README.md
git-remote-rewrite #
I hate migrating between gitweb services. But people keep making dumb choices, and web scraping is still too much for me to go back to self-hosting gitweb.
So this tool should help.
Used like:
git-remote-rewrite --name=srht --search=git@git.sr.ht:~dricottone \
--new-name=tangled --replace=git@tangled.org:dominic-ricottone.com \
--dry-run
Some tips:
- Obviously substitute with your own account names/handles.
- And obviously don't include the
--dry-runflag to actually run it. - Try
git-remote-rewrite --helpif stuck. - Values can be passed on flags like
--flag=valueor--flag value, for both long names and short names. - The
--new-nameflag is optional. - There is a
--pass-on-no-remoteflag which may be helpful for scripting a batch rewrite of many repos' origins.