Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env bash
: ' Usage:
bash <(wget --quiet --output-document=-
# Replaces $1 with $2 in the origin named 'origin' of Git repo
# Should be executed from inside of the repository folder
function replace_in_origin() {
REMOTE_URL=$(git ls-remote --get-url)
git remote set-url origin $REMOTE_URL
echo "Remote URL changed to "$(git ls-remote --get-url)
replace_in_origin "KreditechSSL" "kreditech"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.