Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is 'git reset --soft' a no-op command?

Tags:

git

git-reset

The documentation states that leveraging the --soft option "...Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed files "Changes to be committed", as git status would put it".

It also explains that the target <commit> defaults to HEAD, when not given.

Considering these, does the following command modify anything at all?

$ git reset --soft

like image 346
nulltoken Avatar asked Jan 03 '12 12:01

nulltoken


1 Answers

Considering these, does the following command modify anything at all?

No, it is a no-op.

After thinking about this for a bit: technically it will complain if you are in the middle of a merge with unresolved conflicts however all that this means is that instead of doing nothing, it complains and does nothing.

like image 177
CB Bailey Avatar answered Oct 15 '22 13:10

CB Bailey