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>
```
## Undo local changes with the last content in head
## Undo local changes with the content in index(staging)
```sh
git checkout -- <file_name>
```

View file

@ -75,7 +75,7 @@
"title": "Delete remote tag",
"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>"
}, {
"title": "Revert: Undo a commit by creating a new commit",