1、git init初始化一个库
2、git commit -m "first commit"
3、git remote add origin https://git.coding.net/dongao/xxx_homework.git 连接本地和远程
4、git remote rm origin 删除远程连接库,重新建立(用于删除上一条连接的库)
5、git push -u origin master 将更改推送到远程
6、git push origin master -f 强制更新远程,覆盖以前的分支
IDEA中git的使用,转自:https://www.cnblogs.com/wyb628/p/7243776.html