initial commit

This commit is contained in:
erinn 2020-01-29 13:50:36 -08:00
커밋 14bb2ece01
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제

21
gitfix Executable file
파일 보기

@ -0,0 +1,21 @@
#!/bin/bash
if [ ! -d ".git" ]; then
echo "err: not a git repository"
exit
fi
url=$(git remote -v | grep fetch | sed 's/\t/ /g' | cut -d' ' -f2 | sort | uniq)
lines=$(echo "$url" | wc -l)
dir=$(pwd)
if [ "$lines" != "1" ]; then
echo "err: too many remotes"
exit
fi
cd ..
rm -rf $dir
git clone $url
cd $dir