git常用命令笔记

2018-12-04  本文已影响2人  gleeeli

查看当前分支属于
git branch -vv

无法pull的情况
error: Your local changes to the following files would be overwritten by merge:
pulling is not possible because you have unmerged files
1、先将本地修改存储起来
$ git stash
git stash save “保存信息”

查看缓存列表
git stash list

2、pull内容

$ git pull

3、还原暂存的内容:
git stash apply stash@{0}

还原并删除缓存
$ git stash pop stash@{0}

移除缓存(慎用):
git stash drop stash@{0}

查看某个缓存的不同:
git stash show
查看特定不同
git stash show -p
diff --git a/style.css b/style.css

4、解决文件中冲突的的部分

5、提交commit

上一篇 下一篇

猜你喜欢

热点阅读