Let’s say I have hour commits
* 7bd4815 (HEAD) four
* afe9410 third
* db064dd second
* 46ab932 first
There are no uncommitted changes. What I want to do is non-interactively squash everything after first
, into it. I want the equivalent of
pick 46ab932 first
fixup db064dd second
fixup afe9410 third
fixup 7bd4815 four
Here I’m using four commits as an example, but the actual number of commits will vary. I’ll know the commit’s hash, though, so that’s what I’d like to use.
Searching for this has been fruitless (I’m likely not searching for the correct terms), as I find a lot of solutions, but never to this exact situation.