Git stash
来源:互联网 发布:知牛财经 编辑:程序博客网 时间:2024/06/08 10:31
简介
git stash 可用来暂存当前正在进行的工作
使用范畴
- 比如想pull 最新代码, 又不想加新commit,
- 或另外一种情况,为了fix 一个紧急的bug,
都可以先stash, 使返回到自己上一个commit, 改完bug之后再stash pop, 继续原来的工作。
基础命令:
$git stash
$do some work
$git stash pop
进阶:
Git stash save “work in progress for foo feature”
当你多次使用’git stash’命令后,你的栈里将充满了未提交的代码,这时候你会对将哪个版本应用回来有些困惑,
git stash list
命令可以将当前的Git栈信息打印出来,你只需要将找到对应的版本号,例如使用git stash apply stash@{1}
就可以将你指定版本号为stash@{1}的工作取出来,当你将所有的栈都应用回来的时候,可以使用’git stash clear’来将栈清空。
git stash # save uncommitted changes# pull, edit, etc.git stash list # list stashed changes in this gitgit show stash@{0} # see the last stash git stash pop # apply last stash and remove it from the listgit stash --help # for more information
1 0
- git stash
- git stash
- git stash
- git stash
- git stash
- git stash
- Git Stash
- git stash
- git stash
- git stash
- git stash
- git stash
- git-stash
- git stash
- git stash
- git stash
- git stash
- Git - stash
- Spring AOP三种配置详细介绍
- ADO
- 移动手机开发meta注意问题
- HDU-3870-Catch the Theves
- PHP开发小技巧⑧—CURL请求
- Git stash
- AppStore商店App的相关信息的获取
- C++小知识
- spring @Transactional
- 百度地图Javascript Api定位
- oracle 切割字符按串完成列转行
- 什么是I帧以及如何判断I帧
- win7下vs2010编译生成sqlite3.dll库
- PHP 入门指导(一)