💾 Archived View for freeshell.de › tldr › git-reset.gmi captured on 2024-02-05 at 11:07:53. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
Undo commits or unstage changes, by resetting the current Git HEAD to the specified state.
If a path is passed, it works as "unstage"; if a commit hash or branch is passed, it works as "uncommit".
git reset
git reset {path/to/file(s)}
git reset --patch {path/to/file}
git reset HEAD~
git reset --soft HEAD~2
git reset --hard
git reset --hard {commit}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).