Files
mirror-cathay/git.move.sh
2024-06-25 10:36:32 +07:00

24 lines
312 B
Bash
Executable File

#!/bin/bash
git fetch origin
git branch -a
for BRANCH in `git branch --list|sed 's/\*//g'`;
do
git checkout $BRANCH
done
git checkout master;
git remote add new-origin $1
git push --all new-origin
git push --tags new-origin
git remote -v
git remote rm origin
git remote rename new-origin origin