将存储器导出到另一台计算机 [英] Export a stash to another computer
本文介绍了将存储器导出到另一台计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Computer1上我做了
$ git stash保存功能
我试图获得将补丁存储到文件中,然后将其导入到另一台计算机中。
$ p $ $ git stash show -p> patch
这个命令为我提供了一个文件,可以移动到其他计算机,问题是如何将它作为存储再次导入。
谢谢
解决方案
您可以通过运行
git apply patchfile
来应用补丁文件(无需提交更改)
然后,您可以简单地从当前工作目录创建一个新的藏匿处:
git stash
I need a way to export a stashed change to another computer.
On Computer1 I did
$ git stash save feature
I'm trying to get the stash patch to a file and then import it to another computer
$ git stash show -p > patch
This command gives me a file that I can move to another computer where this repo is cloned, but the question is how to import it as a stash again.
Thanks
解决方案
You can apply a patch file (without committing the changes yet) by simply running
git apply patchfile
Then you can simply create a new stash from the current working directory:
git stash
这篇关于将存储器导出到另一台计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文