mirror of
https://github.com/git-tips/tips
synced 2024-11-10 05:44:14 +00:00
Fix:git checkout -- <file_name> is incorrect #177
This commit is contained in:
parent
8891620064
commit
a8f70a05dc
2 changed files with 2 additions and 2 deletions
|
@ -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>
|
||||
```
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue