You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/undoing.asc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ $ git add forgotten_file
29
29
$ git commit --amend
30
30
----
31
31
32
-
You end up with a single commit – the second commit replaces the results of the first.
32
+
You end up with a single commit -- the second commit replaces the results of the first.
33
33
34
34
[NOTE]
35
35
====
@@ -97,7 +97,7 @@ We'll go into much more detail about what `reset` does and how to master it to d
97
97
==== Unmodifying a Modified File
98
98
99
99
What if you realize that you don't want to keep your changes to the `CONTRIBUTING.md` file?
100
-
How can you easily unmodify it – revert it back to what it looked like when you last committed (or initially cloned, or however you got it into your working directory)?
100
+
How can you easily unmodify it -- revert it back to what it looked like when you last committed (or initially cloned, or however you got it into your working directory)?
101
101
Luckily, `git status` tells you how to do that, too.
102
102
In the last example output, the unstaged area looks like this:
103
103
@@ -130,7 +130,7 @@ You can see that the changes have been reverted.
130
130
[IMPORTANT]
131
131
=====
132
132
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.
133
+
Any changes you made to that file are gone -- Git just copied another file over it.
134
134
Don't ever use this command unless you absolutely know that you don't want the file.
0 commit comments