标题git 的使用
1.下载 git clone xxxxxxxxx
2.上传更新
git status --可以查看到仓库状态
git add xx --将xx暂存
再`git status 可以查看到 modified:xx 的提示信息为Changes to be committed表示未提交
git add . 所有修改文件的暂存
git commit -m “更新说明”` – 将在暂存区的文件提交到本地仓库中
git remote add origin 你的远程库地址 // 把本地库与远程库关联
git push origin master` – 将本地仓库最新修改推送到远程仓库master分支上
error: Your local changes to the following files would be overwritten by merge 解决方案
1 保留修改
执行以下三条命令
git stash #封存修改
git pull origin master
git stash pop #把修改还原
2 废弃修改
核心思想就是版本回退,具体命令如下
git reset --hard
git pull origin master
3 拉取
git pull、git fetch