Created
December 27, 2021 06:14
-
-
Save mw866/50bc352e73cea329576525476445a6b2 to your computer and use it in GitHub Desktop.
#git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## To hard reset a single file to HEAD: | |
git checkout @ -- myfile.ext | |
## Unstage an added file in Git | |
git reset HEAD path/to/file | |
## Check staged differences | |
git diff --cached |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment