commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

Give the user the possibility to commit without add files to staging before.

Open buhtz opened this issue 3 years ago • 3 comments

Description

I am new to cz.

Usually I commit via git commit -a. So every tracked and un-staged file is staged automaticllly.

It seems to me that this is not possible with cz. I got the message "No files added to staging!".

I also tried cz commit -- -a which gives me an "unrecognized command" error.

Possible Solution

Give the user the possibility to commit without add files to staging before.

Additional context

No response

Additional context

#418

buhtz avatar Aug 10 '22 19:08 buhtz

I'm week against this feature. IMO, deciding which files should be include in a commit is an important thing. @Woile what do you think?

Lee-W avatar Aug 11 '22 01:08 Lee-W

I think we've decided a long time ago not to use -a. I suggest 2 alternatives:

  1. If you really wanna use cz commit, then create an alias: alias czc="git add -u && cz commit"
  2. Use fix/feat in your commits and skip the interactive prompt: git commit -am "feat: add shiny thing"

On the other hand we added -s to commit, maybe we can add -a as well which is a commonly used param 🤔

woile avatar Aug 11 '22 06:08 woile

If @Woile 's good with it, I'm good with it as well :) I guess we'll need to make some change to https://github.com/commitizen-tools/commitizen/blob/master/commitizen/git.py and https://github.com/commitizen-tools/commitizen/blob/master/commitizen/commands/commit.py. It'd be great if you could sent us a PR :)

Lee-W avatar Aug 14 '22 02:08 Lee-W

I think this one is finished in #821. Close this one. Thanks for @ttw225's reminder

Lee-W avatar Mar 30 '24 07:03 Lee-W