@matheusbsbs / matheus-bagliano / commits / 8bb95bbca7
Fork 0

Documentation/reset: reorder examples to match description

A previous commit moved the <paths> mode (undoes git-add) to the front in the description, so make the examples follow the same order. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Jul 18, 2010 at 20:23 UTC 8bb95bbca774506b15a1ca3b7ae233118956e45e
1 file changed +23 -23
Documentation/git-reset.txt
+23 -23
@@ -86,6 +86,29 @@ OPTIONS
86 EXAMPLES
87 --------
88
89 +Undo add::
90 ++
91 +------------
92 +$ edit <1>
93 +$ git add frotz.c filfre.c
94 +$ mailx <2>
95 +$ git reset <3>
96 +$ git pull git://info.example.com/ nitfol <4>
97 +------------
98 ++
99 +<1> You are happily working on something, and find the changes
100 +in these files are in good order. You do not want to see them
101 +when you run "git diff", because you plan to work on other files
102 +and changes with these files are distracting.
103 +<2> Somebody asks you to pull, and the changes sounds worthy of merging.
104 +<3> However, you already dirtied the index (i.e. your index does
105 +not match the HEAD commit). But you know the pull you are going
106 +to make does not affect frotz.c nor filfre.c, so you revert the
107 +index changes for these two files. Your changes in working tree
108 +remain there.
109 +<4> Then you can pull and merge, leaving frotz.c and filfre.c
110 +changes still in the working tree.
111 +
112 Undo a commit and redo::
113 +
114 ------------
@@ -133,29 +156,6 @@ current HEAD.
156 <2> Rewind the master branch to get rid of those three commits.
157 <3> Switch to "topic/wip" branch and keep working.
158
136 -Undo add::
137 -+
138 -------------
139 -$ edit <1>
140 -$ git add frotz.c filfre.c
141 -$ mailx <2>
142 -$ git reset <3>
143 -$ git pull git://info.example.com/ nitfol <4>
144 -------------
145 -+
146 -<1> You are happily working on something, and find the changes
147 -in these files are in good order. You do not want to see them
148 -when you run "git diff", because you plan to work on other files
149 -and changes with these files are distracting.
150 -<2> Somebody asks you to pull, and the changes sounds worthy of merging.
151 -<3> However, you already dirtied the index (i.e. your index does
152 -not match the HEAD commit). But you know the pull you are going
153 -to make does not affect frotz.c nor filfre.c, so you revert the
154 -index changes for these two files. Your changes in working tree
155 -remain there.
156 -<4> Then you can pull and merge, leaving frotz.c and filfre.c
157 -changes still in the working tree.
158 -
159 Undo a merge or pull::
160 +
161 ------------