Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/02-git-basics/sections/undoing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ You can see that the changes have been reverted.
[IMPORTANT]
=====
It's important to understand that `git checkout -- <file>` is a dangerous command.
Any changes you made to that file are gone -- Git just copied another file over it.
Don't ever use this command unless you absolutely know that you don't want the file.
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.
Don't ever use this command unless you absolutely know that you don't want those unsaved local changes.
=====

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.
Expand Down