It sounds like a nice idea.. Maybe there is a git plumbing command for it. 

What you could try instead perhaps is to work with patches. Instead of 
staging the state of the file you want to keep, just store it in a patch:

git diff SomeFile.txt > /tmp/1.patch #save state
git checkout . # clear changes
git apply /tmp/1.patch #restore state

You could also consider using git stash -p and selectively stash the diffs 
you want to keep for later.

Where should we submit a feature request in case a porcelain command is 
> missing for this case?

The place to go for feature requests is the Git developer mailing list: 

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to