Git Stash

Don't want to commit the half-done work in your own work directory, but need to pull new updates from remote or check out a branch.
Use git stash.

Stashing takes the dirty state of your working directory – that is, your modified tracked files and staged changes – and saves it on a stack of unfinished changes that you can reapply at any time.

Files in stage area and workspace tracked files will all be stashed when using "git stash".
But when you use "git stash apply", the staged files will not be in the stage area, you can use "git stash apply --index" to keep it in a staged area.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容