Git 工具 - 储藏(Stashing)

储藏你的工作

如果你跟同事在一个分支上开发的话,当你进行git pull 的时候会看到下面这情况

From http://
e2f0f48..c922192 develop -> origin/develop
8e56f34..c922192 master -> origin/master
Updating 8e56f34..e2f0f48
error: Your local changes to the following files would be overwritten by merge:
src/index.js
Please commit your changes or stash them before you merge.
Aborting

需要先把自己的代码储藏下 git stash

在进行 git pull 

然后 git stash pop

了解更多 Git 工具 - 储藏 https://git-scm.com/book/zh/v1/Git-%E5%B7%A5%E5%85%B7-%E5%82%A8%E8%97%8F%EF%BC%88Stashing%EF%BC%89

posted @ 2018-08-29 15:44  郭某某  阅读(155)  评论(0编辑  收藏  举报