Undo Git Commit and Commit again

in #git5 years ago (edited)

a29gsi.png

If you accidentally commit locally, for example:
git commit -m "Fix AppSettings"

You could always go back by moving head.
This command will undo commit and unstage all files.
git reset --soft HEAD~

You could edit files, add only add those which you prefer to commit:
git add .

git commit -m "Fix AppSettings" or use variable git commit -c ORIG_HEAD

Sort:  

Congratulations @tomas-petrauskas! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post
You got a First Vote
You received more than 10 upvotes. Your next target is to reach 50 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Valentine's day challenge - Give a badge to your beloved!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!