Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
buhtz opened this issue Aug 10, 2022 · 4 comments
Closed
Labels
good first issue issue-status: wait-for-implementation maintainers agree on the bug / feature type: feature A new enhacement proposal

Comments

@buhtz
Copy link

buhtz commented Aug 10, 2022

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 buhtz added the type: feature A new enhacement proposal label Aug 10, 2022
@Lee-W Lee-W changed the title <One feature request per issue> Give the user the possibility to commit without add files to staging before. Aug 11, 2022
@Lee-W
Copy link
Member

Lee-W commented Aug 11, 2022

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?

@woile
Copy link
Member

woile commented Aug 11, 2022

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 🤔

@Lee-W
Copy link
Member

Lee-W commented Aug 14, 2022

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
Copy link
Member

Lee-W commented Mar 30, 2024

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

@Lee-W Lee-W closed this as completed Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue issue-status: wait-for-implementation maintainers agree on the bug / feature type: feature A new enhacement proposal
Projects
None yet
Development

No branches or pull requests

3 participants