如果已存在项目
1、在git bash里 进入项目所在目录, git init //初始化
2、git config --globle user.name ‘happy‘ //设置远程仓库
3、git config --globle user.email ‘stone8386@sina.com‘ //设置远程仓库
4、用浏览器打开远端git 仓库, 比如 https://gitee.com/, 新建仓库,比如salary, 然后复制 克隆地址, 比如“https://gitee.com/happy76819/salary.git”
5、git remote add salary ‘https://gitee.com/happy76819/salary.git‘ //设置远程仓库地址
6、git pull salary master //从远程仓库拉取文件和本地文件合并
7、git add -A //提交到本地临时库
8、git commit -m‘first commit‘ //提交到本地仓库
9、git push --set-upstream salary master
10、 git push //上传到远程仓库
原文:https://www.cnblogs.com/leon-ytparty/p/10566508.html