Teoman shipahi
Teoman shipahi

Reputation: 23042

Save stashed files into another folder

I have 5 files (mostly .config files) has been stashed from Branch A. Now, I switched to Branch B. Before I apply stash from A to B, I would like to export as separate files, and browse them with a text editor.

Is it possible to export stashed files into another directory?

Upvotes: 1

Views: 1628

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520908

One option here at your disposal is git stash branch, which creates, and then checks out, a new branch starting from the commit at the stash:

git stash branch tempbranch

From the branch tempbranch you can copy whatever files you want. When you are finished with the branch, simply delete it and you are done.

Upvotes: 2

Related Questions