git存储应用版本 [英] git stash apply version
问题描述
我有2个分支master |设计
在设计工作中,我做了一个储藏并切换到主人,做了一些调整。切换回设计,并做了一个藏匿只适用于在设计分支失去所有我的变化。
我希望我所有的工作都处于隐藏状态,因为我没有清除或删除这些。
如果我做一个存储列表,我会得到4个结果:
stash @ {0}:WIP on design:f2c0c72 ...调整密码恢复电子邮件
存储@ {1}:WIP设计:f2c0c72 ...调整密码恢复电子邮件
存储@ {2}:WIP on design:eb65635 ... Email Adjust
stash @ {3}:WIP on design:eb65635 ... Email Adjust
如果我尝试 git stash apply f2c0c72
我收到一个错误:
致命:需要一次修订
f2c0c72:找不到有效的隐藏状态
如何申请特定的藏匿处?
希望有人能帮忙!!
隐藏密钥实际上是左边的隐藏@ {n}
项目。因此,请尝试 git stash apply stash @ {0}
等(注意在某些shell中,您需要引用stash @ {0}
,比如zsh,fish和powershell)。
实际上,@ {0}是git中的修订版本,您可以切换到...但 git stash apply ...
应该找出如何将DTRT应用到您当前的位置。
I really hope someone can advise.
I have 2 branches master | design
Working in design I did a stash and switched to master, made some adjustments. Switched back to design and did a stash apply only to lose all my changes in the design branch.
I am hoping all my work is within a stash as I have not cleared or removed these.
If I do a stash list I get 4 results:
stash@{0}: WIP on design: f2c0c72... Adjust Password Recover Email
stash@{1}: WIP on design: f2c0c72... Adjust Password Recover Email
stash@{2}: WIP on design: eb65635... Email Adjust
stash@{3}: WIP on design: eb65635... Email Adjust
If I try git stash apply f2c0c72
I am getting an error:
fatal: Needed a single revision
f2c0c72: no valid stashed state found
How can I apply a specific stash?
Hope someone can help!!
The keys into the stash are actually the stash@{n}
items on the left. So try git stash apply stash@{0}
etc. (note that in some shells you need to quote "stash@{0}"
, like zsh, fish and powershell).
In fact stash@{0} is a revision in git that you can switch to... but git stash apply ...
should figure out how to DTRT to apply it to your current location.
这篇关于git存储应用版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!