Created
November 10, 2023 21:14
-
-
Save jefrnc/91f71028b7992071463bee757f71334d to your computer and use it in GitHub Desktop.
Local Switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
origin_url=$(git config --get remote.origin.url) | |
if [[ $origin_url == *"AgTechHub"* ]]; then | |
new_url=${origin_url/AgTechHub/nera-agro} | |
git remote remove origin | |
git remote add origin $new_url | |
echo "El origen del repositorio se ha actualizado a $new_url" | |
else | |
echo "El repositorio actual no pertenece a la organización AgTechHub." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment