1,git checkout
今天在本地切换分支,一直切换不了,就一直报错
error: Your local changes to the following files would be overwritten by checkout:
package.json
src/model/user.ts
webpack.config.build.js
webpack.config.dev.js
Please commit your changes or stash them before you switch branches.
Aborting
查了好多资料才知道原来每次checkout之前要先把自己的这个分支commit一下才可以。就算不commit到远程,只commit到本地也可以。