本地项目代码提交到远程仓库—新建项目
克隆后把项目移进去(推荐)(conding.net)
首先我们新建一个目录code,之后去到新目录code里,使用git clone远程仓库。
git clone https://git.coding.net/zzq0503/myData.git
再把我们本地项目整个文件夹移入code目录中。(移入在.git的同级目录下)
这时候使用git status查看就发现 多了很多需要提交的文件(.git的同级目录运行git bash)
也就是我们的本地项目代码文件啦。
使用以下命令提交到远程仓库
git remote add origin https://git.coding.net/wangfeipeng/foryou2.git
git add .
git commit -m “首次提交项目文件代码”
git push origin master
即可。
设置用户 邮箱
$ git config --global user.name “Your Name”
$ git config --global user.email "email@example.com"