是否可以将 git stash 推送到远程存储库? [英] Is it possible to push a git stash to a remote repository?

查看:59
本文介绍了是否可以将 git stash 推送到远程存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 git 中,是否可以创建存储、将存储推送到远程存储库、在另一台计算机上检索存储并应用存储?

In git, is it possible to create a stash, push the stash to a remote repository, retrieve the stash on another computer, and apply the stash?

或者是我的选择:

  • 创建补丁并将补丁复制到另一台计算机,或
  • 创建一个小分支并将未完成的工作提交到该分支?

推荐答案

无法通过 fetch 左右获取,镜像 refspec 为 fetch = +refs/*:refs/*,即使 stash 是 refs/stash 它也不会被发送.显式的 refs/stash:refs/stash 也无效!

It's not possible to get it via fetch or so, the mirror refspec is fetch = +refs/*:refs/*, and even though stash is refs/stash it doesn't get sent. An explicit refs/stash:refs/stash has no effect either!

无论如何这只会令人困惑,因为这不会获取所有隐藏内容,只会获取最新的内容;stash 列表是 ref refs/stashesreflog.

It would only be confusing anyway since that wouldn't fetch all stashes, only the latest one; the list of stashes is the reflog of the ref refs/stashes.

这篇关于是否可以将 git stash 推送到远程存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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