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 checkout
):
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 This content has been proxied by September (ba2dc).Proxy Information
text/gemini;lang=en-GB