Tutorial Melayu

Git undo commit terakhir

Introduction

user

Fairuz

System Engineer (Texas Instruments France), Masters in Electronics , Embedded System Engineering,


LATEST POSTS

Nota: git alias yang biasa digunakan 05th December, 2013

Nota: Android .gitignore 23rd February, 2013

Git

Git undo commit terakhir

Posted on .
$ git reset --soft HEAD^              (1)
$ edit something here                 (2)
$ add files to using git add
$ git commit -c ORIG_HEAD       (3)

1 – This 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”.
2 – Make corrections to working tree files.
3 – “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.

profile

Fairuz

http://www.tutorialmelayu.com

System Engineer (Texas Instruments France), Masters in Electronics , Embedded System Engineering,

Comments
user

Author hotfloppy

Posted at 11:25 pm May 2, 2012.

Kata TutorialMelayu, ni apsal ada English lak ? huhuhuhu..

Reply
    user

    Author mdpai

    Posted at 3:08 am August 31, 2012.

    keke, hari tu nak cepat untuk buat note kat opis, tak sempat tuka bahasa.

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

View Comments (2) ...
Navigation