sapling icon indicating copy to clipboard operation
sapling copied to clipboard

Equivalence between `git reset` and `sl hide` is wrong

Open arxanas opened this issue 3 years ago • 1 comments

In the Git cheat sheet, the following are equated:

  • git reset --hard COMMIT
  • sl hide COMMIT

This is wrong. The former resets to COMMIT, essentially deleting commits up to but not including COMMIT, while sl hide will also delete the target commit.

arxanas avatar Nov 15 '22 23:11 arxanas

Git doesn't really have an operation for deleting commits, unless we're talking about git gc. It just hides all commits which are not part of a branch or the current head.

luontola avatar Nov 16 '22 11:11 luontola