将git stashes从一个repo移动到另一个repo

markdown
阅读 47 收藏 0 点赞 0 评论 0

move-stashes.md
# Move git stashes from one repo to another
---------------
This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.

## Download your stashes

    git stash show -p > patch

You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.

## Apply your stashes

    cd /new/project/dir
    git apply /old/project/dir/patchfile
    git stash
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号