1
0
mirror of https://github.com/namibia/tips.git synced 2024-12-22 02:08:53 +00:00

Fix:git checkout -- <file_name> is incorrect #177

This commit is contained in:
Arnab Nandy 2023-04-06 10:41:48 +05:30
parent 8891620064
commit a8f70a05dc
2 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,7 @@ git tag -d <tag-name>
git push origin :refs/tags/<tag-name> git push origin :refs/tags/<tag-name>
``` ```
## Undo local changes with the last content in head ## Undo local changes with the content in index(staging)
```sh ```sh
git checkout -- <file_name> git checkout -- <file_name>
``` ```

View File

@ -75,7 +75,7 @@
"title": "Delete remote tag", "title": "Delete remote tag",
"tip": "git push origin :refs/tags/<tag-name>" "tip": "git push origin :refs/tags/<tag-name>"
}, { }, {
"title": "Undo local changes with the last content in head", "title": "Undo local changes with the content in index(staging)",
"tip": "git checkout -- <file_name>" "tip": "git checkout -- <file_name>"
}, { }, {
"title": "Revert: Undo a commit by creating a new commit", "title": "Revert: Undo a commit by creating a new commit",