X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-reset.txt;h=5b55cda512bbdb507486ac5d0db0d28e32b1dcb1;hb=045f5759c97746589a067461e50fad16f60711ac;hp=73a0ffc41085e87fbc996fab4baa25ace1951460;hpb=0f2ca9d5c99436d048bfe0a7161b4365a731938f;p=git.git diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 73a0ffc41..5b55cda51 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -7,7 +7,9 @@ git-reset - Reset current HEAD to the specified state SYNOPSIS -------- -'git-reset' [--mixed | --soft | --hard] [] +[verse] +'git-reset' [--mixed | --soft | --hard] [] +'git-reset' [--mixed] [--] ... DESCRIPTION ----------- @@ -21,6 +23,10 @@ the undo in the history. If you want to undo a commit other than the latest on a branch, gitlink:git-revert[1] is your friend. +The second form with 'paths' is used to revert selected paths in +the index from a given commit, without moving HEAD. + + OPTIONS ------- --mixed:: @@ -31,15 +37,15 @@ OPTIONS --soft:: Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed - files "Updated but not checked in", as gitlink:git-status[1] would + files "Added but not yet committed", as gitlink:git-status[1] would put it. --hard:: Matches the working tree and index to that of the tree being switched to. Any changes to tracked files in the working tree - since are lost. + since are lost. -:: +:: Commit to make the current HEAD. Examples @@ -88,11 +94,11 @@ current HEAD. <2> Rewind the master branch to get rid of those three commits. <3> Switch to "topic/wip" branch and keep working. -Undo update-index:: +Undo add:: + ------------ $ edit <1> -$ git-update-index frotz.c filfre.c +$ git add frotz.c filfre.c $ mailx <2> $ git reset <3> $ git pull git://info.example.com/ nitfol <4> @@ -115,10 +121,6 @@ Undo a merge or pull:: + ------------ $ git pull <1> -Trying really trivial in-index merge... -fatal: Merge requires file-level merging -Nope. -... Auto-merging nitfol CONFLICT (content): Merge conflict in nitfol Automatic merge failed/prevented; fix up by hand