Git操作

初始化仓库 git init

加入文件 git add .   git add 文件名

提交代码到本地仓库 git commit -m "提交说明内容"

添加远程仓库地址 git remote add origin [url]

推送代码到远程仓库 git push -u origin master   git push -u origin 分支名

拉取远程代码前执行 git reset --hard 覆盖现有文件

拉去远程端代码   git pull 

https://blog.csdn.net/weixin_30699831/article/details/101982286

原文地址:https://www.cnblogs.com/CelonY/p/12511473.html