Git Shelve vs藏匿 [英] Git Shelve vs Stash

查看:446
本文介绍了Git Shelve vs藏匿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很不熟悉Git的 shelve 方面。如果 stash 用于搁置未完成的工作,那么 shelve 然后呢?你会用它做什么?

解决方案

git shelve 不会存在于Git中。

只有 git存储


  • 当您要记录工作目录和索引的当前状态时,但想回到一个干净的工作目录。

  • >您有一个2008年旧项目 git shelve 来隔离分支中的修改,但那不会现在非常有用。


    I am very unfamiliar with the shelve aspect of Git. If stash is used to put aside unfinished work what is shelve then? What would you use it for?

    解决方案

    git shelve doesn't exist in Git.

    Only git stash:

    • when you want to record the current state of the working directory and the index, but want to go back to a clean working directory.
    • which saves your local modifications away and reverts the working directory to match the HEAD commit.

    You had a 2008 old project git shelve to isolate modifications in a branch, but that wouldn't be very useful nowadays.

    这篇关于Git Shelve vs藏匿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆