git stash操作
2015-12-24 18:34
513 查看
在git操作中,有时修改了code,然后要切换到其他的branch进行工作。这时,如果有部分code不需要提交commit,有不想丢弃,则可以进行stash操作。
下面是stash help提供的信息:
在一般的工作中,需要的操作一般如下:
比如:
下面是stash help提供的信息:
git stash list [<options>] git stash show [<stash>] git stash drop [-q|--quiet] [<stash>] git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>] git stash branch <branchname> [<stash>] git stash [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [-u|--include-untracked] [-a|--all] [<message>]] git stash clear git stash create [<message>] git stash store [-m|--message <message>] [-q|--quiet] <commit>
在一般的工作中,需要的操作一般如下:
git stash save "message" // ...... 其他操作 // 取回 git stash pop --index
比如:
>>>git stash save "config-change for localhost" >>>git stash list stash@{0}: On base_pay: config-change for localhost stash@{1}: 1 stash@{2}: 1 stash@{3}: 1 stash@{4}: 1 stash@{5}: 111 >>>git stash pop --0 On branch master_new >>>git stash clear >>>git stash list >>>
相关文章推荐
- hdu--1011
- Linux C 数据结构---线性表
- spring 整合quartz的方式——简单介绍
- GPT && EFI
- Maven多模块项目管理小结
- LeetCode 18 - 4Sum
- Jackson fasterxml和codehaus的区别
- ASP.NET MVC(一)model与数据库
- max_connect_error的说明
- python 各类距离公式实现
- C# 二维list
- CCNP学习笔记13-交换部分---EthernetChannel
- 蓝桥杯VIP题库之第一期——时间转换
- MySQL引擎
- js实现程序框
- JAVA面向对象之封装
- PHP操作postgreSQL的状态判断
- Codeforce 106C
- C#中静态与非静态方法比较
- JNI包装c++类