Search code examples
gitcopysaveexportgit-stash

What is the most practical way to keep working on a git stash on a different computer?


it happened more than once to leave the office having only saved a stash of uncommitted code.

So, if I wanted to keep working on the same feature, I had to SSH to my host, create a disposable branch, commit the stash and push the new branch to the development repository.

Now I wonder if there is a cleaner, more practical solution for "copying/exporting" a git stash to another local repository. I have already ruled out SCP'ing the local repository on my office machine, because I could have some work in progress on my laptop, too.

P.S.: my question looks like the continuation of this one


Solution

  • You can use git stash show to make a patch and then git apply it on your home machine.