git cz -a just differently broken now
See original GitHub issueHello there, thanks for this project. I’ve really enjoyed getting changelogs out of my commit messages. I think a recent change to git cz -a
(to fix a perhaps over exuberant git add .
) has unfortunately just broken things differently. It’s late where I am, so I’ll have to try and come up with an example repo tomorrow, but I’m currently running into an issue where I get the following output in a terminal:
$ git --version
git version 2.18.0
$ node --version
v8.11.3
$ npm --version
6.2.0
$ git status
On branch feat/whatever
Your branch is up to date with 'origin/feat/whatever'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/index.html
modified: src/main.css
no changes added to commit (use "git add" and/or "git commit -a")
$ git cz -a
No files added to staging! Did you forget to run git add?
$ git commit -am "feat(html): whatever"
[feat/something-idk 89f79ac] feat(html): whatever
2 files changed, 2 insertions(+)
So, it seems to me something is still not quite right with the -a
flag. Thanks again for your help. I’ll be happy to try and test out any steps anyone might recommend for me.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Update to esLint on Angular breaks commitlint - Stack Overflow
Now when I run npx git-cz I get a different set of types for "type of commit". I get Fix, Update, Breaking, Docs,...
Read more >Do you keep a tidy Git commit history? | by Ali Haydar - Medium
I just needed to review the project changes on other occasions, and I would appreciate clear, concise commit messages. Some of the messages...
Read more >hyphens - CSS: Cascading Style Sheets - MDN Web Docs
Words are not broken at line breaks, even if characters inside the words suggest line break points. Lines will only wrap at whitespace....
Read more >Broken Links - Open Government Partnership
Broken Links: Open Data to Advance Accountability and Combat Corruption offers an overview of the state of open data against political corruption in...
Read more >git push fatal failed - Super User
change owner on server; Error "PUT error: curl result=22, HTTP code=403" has gone.. now only says git-http-push failed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, here are some repro steps and a possible solution (though I don’t know enough about how other people use Git to know if there are any ramifications to my approach):
Repro:
I think the problem is here src/commitizen/staging.js#L9 …
isClean
should not rungit diff
with the--cached
flag. Here’s a couple more steps to verify that it would behave as I’d expect if that flag were removed:Without the
--cached
flag Git lists the expected/tracked list of files which would return false, and thecommit
operation would run with the appropriate passed-in flags. If you think that’s a viable solution I’d be happy to open a PR some time later this evening. Please let me know what you think!✨❤️🌟
Related to #376 and #471