As I know that git reset --hard
can potentially cause unwanted data loss because it may make changes that cannot be undone, is there a way to check what it would do before I execute it? Basically I'm looking for something that would be logically
git reset --hard --dry-run
or
git reset --hard --verbose --dry-run
which unfortunately do not work with currently existing Git because reset
doesn't support --dry-run
.
git reset --hard
doesn't have dry run mode but this should get you close to the same information:or as a single-liner: