Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 106

Git stash: How to stash tracked files into a single stash via script?

$
0
0

I often do something like git add/checkout/stash -- (find -name "*.extension").For example, to revert all text files or all images.

It works fine with add and checkout.When using add, untracked files are added, too.When using checkout or stash, untracked files are listed as errors ('<file>' did not match any file(s) known to git).

When using checkout, there's at least the workaround to do this:

for file in (find -name "*.extension")    git checkout -- $fileend

But when using stash, this would create one new stash per file.

I would expect it to work in a way that git stash tracked-file untracked-file is the same as git stash tracked-file.

Is this possible?Or is there a workaround?


Viewing all articles
Browse latest Browse all 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>