Closed ognjenjevremovic closed 2 years ago
Love this, thank you for adding it! I run into this several times a day because I'm used to running git commit -a
, but forget to add -a
to commitizen. It's definitely super frustrating to fill out the questionnaire and then have it do nothing b/c I forgot to stage files. This would preserve the behaviour that Git itself has:
$ git commit
On branch properly-approve-rfc-33
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ... the files that are unstaged ...
no changes added to commit (use "git add" and/or "git commit -a")
Any updates on the PR review?
Yeah this would be awesome to get a review of this, thank you!
Thanks! Sorry for the delay on this
👏 yay! Thank you so much! Can't wait for this to be released, appreciate all the hard work @LinusU!
:tada: This PR is included in version 4.2.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes #785 and #585 (since the cause of these issues was related)
Changes
git-cz
,git-cz
command) throw "No files added to staging!" error ,git -a
flag (--all
) - runninggit-cz --all
should add all the changed files to the staging area prior to spawning the prompt (no error thrown),Checklist
After the changes I ensured that:
npm run test
,npm run build
,mkdir test && cd test && npm init -y && git init
),cz-cli
package by runningnpm run build
, from within cz-cli directory,node /path/to/cz-cli/project/bin/git-cz
(with and without—all
flag, in different case scenarios),Done