pycharm原工程名为rds_autobackup,然后我改为了rds_autorestore
git就无法同步到gitlab了。
1.先在gitlab上创建了一个新的项目,取名rds_autorestore。注意不要勾选添加readme文件
然后gitlab上面给出了方法:
Push an existing Git repository
git remote rename origin old-origin
git remote add origin https://gitlab.66law.cn/lantianyun/rds_autorestore.git
git push -u origin --all
git push -u origin --tags
2.所以我就在我的新目录,右键打开Git bash :
照着上面的代码敲了一遍:
3.然后在pycharm中设置remote:
4.然后重启pycharm
之前没有重启,老是不成功。后来重启了以下,commit和push就都能用了。