Despite git step description states that "this step is shorthand for the generic SCM step", it behaves differently when specifying commit hash as a branch to checkout. Consider the following pipeline:
Though the stages should be identical according to docs, the second stage fails:
However if branch is set to "master" - it works just fine.
So, it looks like git step follows a completely different path from what the checkout step does. Either git step's description or, preferably, its behaviour needs to be changed.
PS I vaguely recall that at some point the stages worked identical indeed but now it's definitely not so.