git commit - git amend added files in the staging area too -
I've changed a lot of files and added them to the Git Loft area, then, before I made them, I realized That I must change the committed message of previous commit. Therefore, I did a git commit --amend and changed the committed message without changing logs. Well, he added files in the staging area for the previous commission.
What should I do, as to make the previous allegation in my original form and to bring my changed files back to the staging area so that I do
It's worth it, I know that I have made my changes before and should change the message message history by using git rebase -i .
You must send SHA1 to your previous command
Git reflog By using this hash, you reset the existing branch to
git in its previous state - Soft End Lt; SHA1 & gt; After this, you can git commit --amend to hide your changes, and then change the committed message.
Comments
Post a Comment