layris3 / Daily-learning-experience-record

daily learning experience
0 stars 0 forks source link

git-git commit --amend #9

Open layris3 opened 4 years ago

layris3 commented 4 years ago

if you forgot to stage some changes just after the previous commit or you want to rewrite the commit message,this command may help you.

1 stage the changes 2 run the command "git commit --amend" 3 edit the commit message and save

be careful:this prompt would make the previous commit seems like never happened!

layris3 commented 4 years ago

press "i" into the edit mode,you can edit the commit message.

after edited,press Esc to exit the edit mode.

press :wq enter