1.进入项目目录中输入命令:git init
2. 创建 .ignore 文件添加忽略提交内容
3. 提交项目到本地仓库:git add -A;git commit -am 'first commit'
4. 在github网站https://github.com/上创建仓库
5. 建立本地仓库和远程仓库的连接: git remote add origin https://github.com/LiHongTai/aop-study.git
6. 推送本地代码到远程仓库:git push --set-upstream origin master
如果想和远程仓库断开: git remote remove origin