-----Original Message-----
On June 6, 2017 9:23 AM, rajdeep mondal wrote:
>Work around found in:
>https://stackoverflow.com/questions/3040833/stash-only-one-file-out-of-multiple-files-that-have-changed-with-git
>Workaround is not very optimal. Please add this support to git.

Instead of using stash as part of your normal process, consider using topic 
branches instead. Before working, switch to a new topic branch. If you forget, 
stash, switch, apply, then go forth. While on the topic branch, you can use add 
and commit on a hunk or file basis to satisfy what appears to be the 
requirement here. You can then merge the desired commits from your topic branch 
into wherever you want to merge them either preserving the commit or by 
squashing commits together.

In my shop, stash is only used for the "I forgot to switch to a topic branch, 
oops" process. I try to encourage people not to use it. I also discourage 
squashed commits, but that's because I like knowing what's in my sausages 😊

Cheers,
Randall


Reply via email to