4

I am learning git and came across git soft reset and amending a commit in git. I see both of them serving the same purpose. Any notable difference between the two. Please let me know since I am not able to see any difference between the two.

zilcuanu
  • 3,451
  • 8
  • 52
  • 105
  • 1
    Possible duplicate of [Practical uses of git reset --soft?](http://stackoverflow.com/questions/5203535/practical-uses-of-git-reset-soft) – René Höhle Nov 20 '15 at 17:26

1 Answers1

8

git commit --amend will change your most recent commit on the current branch by adding any staged changes you've made so far to it and prompt you to change the commit message.

git reset --soft will actually remove commits from the current branch but keep the changes as uncommitted changes that need to be staged and recommitted.

Taelsin
  • 1,030
  • 12
  • 24