1. 当git地址改变
其实git远程地址改变和idea没有任何关系,idea上Git里面也没有重新定位远程地址的选项,下面是我的一个idea项目git远程地址修改后的解决办法:
打开 “git bash” 输入命令:git remote set-url origin xxxxx (“xxxx”就是你的新的git地址 )
-----查看新的仓库地址: $ git remote -v
2.新建仓库提交代码
…or create a new repository on the command line
echo "# mybatis-generator-core" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/ColoZhu/mybatis-generator-core.git
git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/ColoZhu/mybatis-generator-core.git
git push -u origin master