第一步:在github上新建项目库
第二步:获取github上的新项目库,到本地
git clone 项目库路径 指定目录
第三步:把项目代码复制到[指定目录]
执行文件添加命令
git add .
第四步:新修改内容提交到本地库
git commit -m "提交说明"
第五步: 上传到远程库
git push
示例
例如现在有github项目库路径:https://github.com/asdfhalkehflkajdhf/LV
用户名:llv
密码:123456
本地项目路径:C:\Users\lenovo\Desktop\lv
第一步:新建githu项目库,参考
https://blog.csdn.net/tao_627/article/details/51407391
https://jingyan.baidu.com/article/8cdccae9269b1f315413cde2.html
说明下,里没有配置ssh是因为使用的是window版本git cmd窗口。还有一个是因为我并不需要什么安全管理,和用户认证。
第二步:
打开git cmd
cd C:\Users\lenovo\Desktop
git clone https://github.com/asdfhalkehflkajdhf/LV lvGit
第三步:
cd lvGit
copy C:\Users\lenovo\Desktop\lv .\
git add .
第四步:
git commit -m "init"
第五步:
git push
没有使用git pull是因为,就一个人使用和提交,还用个屁呀。又没有冲突。
git pull命令,从远程仓库拉取代码,更新到最新代码,在多人开发中,自己提交前会执行,以解决代码冲突。