Sorry, this will not be the real answer.
There may be some way, but in fact I do not see much sense in this. The consensus is pretty bright. There is nothign incorrectly committing completely temporary or broken files. Until you press it in public, this is all your local repository. Just create a new branch, commit it, then at some point you can delete this branch, even right away. The only thing you need to be careful about is not pushing this branch to a public repo. The biggest plus is that during commit, you can selectively select which files you want to include. This will allow you to filter out any unwanted binaries, archives, etc. - and with very small details. This is really much more convenient than trying to filter them out on bash and the like.
So, for me, if you are building packages, then you really want to commit. Just because at some point in time you will need to check what the source files are. Or back to him. Exactly what branches and the entire repository have: marking and storing some files in a certain state. The repository is not only for storing the "release code". This is in order to keep everything you need at any given time, in the same condition as at that time.
Therefore, I even recommended a quick branch for these collectors / packages. Do not hide. Steish is something temporary, designed for rapid evaporation. You get a hash for this, but you can easily remove the entire / stash / revision branch. That would definitely destroy the essence of the version. You put it in git to remove it.
Using regular branches and regular commits for any future, you can view or recreate any RPM that you created at any time in history. IMHO, this is a huge plus.
source share