Products Resources Support About Us

Trying a git reset HEAD --hard .... and failing

After a pull i decided to reverse it using: git reset HEAD --hard and got the message:

fatal: Cannot do hard reset with paths.

This makes no sense to me as:

  1. I’m in the subdirectory where the git repository resides
  2. there are no git repositories higher in the directory chain
  3. a co-worker got it to work

Please advise

Is that helpful?

What my co-worker did he wasn’t able to recreate and when I tried exactly what he did it didn’t work.

He then did something on his Linux box with a ‘git restore’ which i don’t see on z/OS.

Hello Lionel,

The restore command was added in Git 2.23.0, whereas the latest release of Git on z/OS is 2.14.4. We’re going to update Git in Q3 2020.


Q3 2020 - perfect. We’re in Q3 2020 now - looking forward to it. Any more firm date or just sometime prior to Sept 30?

Hello Lionel,

Sorry, I can’t give a better estimate right now.


no worries - i can be patient :slight_smile: