简体   繁体   English

我可以从抓取中恢复GIT藏匿

[英]Can I recover a GIT stash from a fetch

I've got a git repo, and my colleague had a clone of that on his PC. 我有一个git repo,我的同事在他的电脑上克隆了它。 For whatever reason, we've lost his repository due to technical issues. 无论出于何种原因,我们因技术问题而丢失了他的存储库。

A short while before we lost his repo, he stashed some work, and I did a git fetch followed by a git merge master . 在我们失去回购之前的一段时间,他隐藏了一些工作,我做了一个git fetch接着是一个git merge master

Is it possible to get the content of the stash? 是否有可能获得藏匿的内容? Would the git fetch command have pulled the stash over as well? git fetch命令是否也会将git fetch拉过来?

I can view all the remote branches with git branch -a but I need the stashed data. 我可以使用git branch -a查看所有远程分支,但我需要隐藏数据。

We're running git version 1.6.3.3 on Ubuntu 9.10 Karmic 我们在Ubuntu 9.10 Karmic上运行git version 1.6.3.3

Sorry, I don't believe you can recover from this. 对不起,我不相信你能从中恢复过来。 (arguably, if you could, it would be a security risk; someone might have stashed a password inside of a configuration file or something.) (可以说,如果可以的话,这将是一个安全风险;有人可能会在配置文件或其他内容中隐藏密码。)

From the documentation ( git fetch --help ): Fetches named heads or tags from one or more other repositories, along with the objects necessary to complete them. 从文档( git fetch --help ): Fetches named heads or tags from one or more other repositories, along with the objects necessary to complete them.

Key word: named heads . 关键词: 命名头 Sadly, the stash isn't a named head (or a tag). 遗憾的是,藏匿不是命名头(或标签)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM