且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以将 git stash 推送到远程存储库?

更新时间:2023-11-28 23:21:22

无法通过 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.