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

The documentation states that using the --soft option "... Does not apply to the index file or working tree in general, but requires that they be in good condition. This leaves all your modified" Changes should be committed "files since the git status will be placed. "

He also explains that the target <commit> defaults to HEAD if not specified.

With this in mind, can the following command change anything at all?

$ git reset --soft

+4
source share
1 answer

With this in mind, can the following command change anything at all?

No, this is not-op.

After thinking about it a bit: technically he will complain if you are in the middle of a merger with unresolved conflicts, but all this means that instead of not doing anything, he complains and does nothing.

+5
source

Source: https://habr.com/ru/post/1389071/


All Articles