git --- stash用法

1 git stash命令介绍

// 保存当前分支的修改,回到上个版本的状态
git stash 	

// 保存当前分支的修改,回到上个版本的状态,msg是保存当前修改的说明			
git stash save "msg"	

// 用来展示所有保存的列表
git stash list	

// 用来展示某一保存记录所修改的操作		
git stash show			

// 恢复之前保存的修改操作并删除该保存记录
// 默认是恢复最近一次的(git stash pop@{
   
    
    0})
// 如果想指定恢复,可以在pop 加上 stash@{
   
    
    number}
// number表示stash list的顺序,例如 git stash pop@{
   
    
    1

猜你喜欢

转载自blog.csdn.net/weixin_42445727/article/details/129258139