💾 Archived View for freeshell.de › tldr › git-reset.gmi captured on 2022-06-11 at 21:53:15. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

git reset

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".

More information.

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).

CC-BY