Package: git-core
Version: 1:1.5.6-1

From git-reset(1):
...
>        Undo a commit and redo
>
>                $ git commit ...
>                $ git reset --soft HEAD^      âfB(1)âfR
>                $ edit                        âfB(2)âfR
>                $ git commit -a -c ORIG_HEAD  âfB(3)âfR
>            â
>            âfB1. âfRThis is most often done when you remembered what you
> just committed is incomplete, or you misspelled your commit message, or
> both. Leaves working tree as it was before "reset".  â âfB2. âfRMake
> corrections to working tree files.  â
>            âfB3. âfR"reset" copies the old head to .git/ORIG_HEAD; redo the
> commit by starting with its log message. If you do not need to edit the
> message further, you can give -C option instead.
>
>            See also the --amend option to git-commit(1).  â
>            .RE
>
>            Undo commits permanently
>
>                    $ git commit ...
>                    $ git reset --hard HEAD~3   âfB(1)âfR
>                â
>                âfB1. âfRThe last three commits (HEAD, HEAD^, and HEAD~2)
> were bad and you do not want to ever see them again. Do not do this if you
> have already given these commits to somebody else.  â .RE
>
>                Undo a commit, making it a topic branch
>
>                        $ git branch topic/wip     âfB(1)âfR
>                        $ git reset --hard HEAD~3  âfB(2)âfR
>                        $ git checkout topic/wip   âfB(3)âfR
>                    â
>                    âfB1. âfRYou have made some commits, but realize they
> were premature to be in the "master"
...

Regards,
-- 
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to