To avoid XY I will explain my goal:
I am writing a RunManager which should execute a process of given version. I want to add an option to run the process with the current directory contents (including uncommitted changes), and tag those changes somehow with a deterministic name.
What I'm thinking is to create a git patch, give it a SHA as if it was a commit, copy it to the remote server and apply.
How can I acheive the SHA part?