Skip to content

Commit 7338c76

Browse files
authored
Merge pull request #1179 from rpjday/topic/rpjday/undoing
Undoing things: Clarify what "git checkout" does to local files
2 parents 4e87f6e + 1bb4405 commit 7338c76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/02-git-basics/sections/undoing.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ You can see that the changes have been reverted.
130130
[IMPORTANT]
131131
=====
132132
It's important to understand that `git checkout -- <file>` is a dangerous command.
133-
Any changes you made to that file are gone -- Git just copied another file over it.
134-
Don't ever use this command unless you absolutely know that you don't want the file.
133+
Any local changes you made to that file are gone -- Git just copied the most recently-committed version of that file over top of it.
134+
Don't ever use this command unless you absolutely know that you don't want those unsaved local changes.
135135
=====
136136

137137
If you would like to keep the changes you've made to that file but still need to get it out of the way for now, we'll go over stashing and branching in <<ch03-git-branching#ch03-git-branching>>; these are generally better ways to go.

0 commit comments

Comments
 (0)