git 修改 url

git info 查看

git remote rm origin 
git remote add origin [email protected]:/home/git/court.git

改了以后会出现

If you wish to set tracking information for this branch you can do so with:

执行次就可以了

git pull origin master
git push -u origin master

做一个 bash 来处理

git remote rm origin 
git remote add origin $1
git pull origin master
git push -u origin master

或者安装 bash_tools 中的 git_origin 来修改