question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cz bump return git.commit error : ""

See original GitHub issue

Description

cz bump return git.commit error: "".

> cz bump
bump: version 0.3.0 → 0.4.0
tag to create: v0.4.0
increment detected: MINOR

git.commit error: ""

Configuration :

commitizen:
  name: cz_conventional_commits
  tag_format: v$version
  version: 0.4.0

It seems that the configuration file is updated, but not the changelog and no tag is created.

Steps to reproduce

  1. run cz bump

Current behavior

cz bump return git.commit error: "".

Desired behavior

  • Creation of the tag
  • Update changelog

Screenshots image

Environment

Add output of the following command to include the following

  • Commitizen Version: 2.20.3
  • Python Version: 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)]
  • Operating System: Windows

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
woilecommented, Jan 7, 2022

To update the changelog by doing only cz bump, you need the setting update_changelog_on_bump = true see https://commitizen-tools.github.io/commitizen/bump/#update_changelog_on_bump Otherwise you have to manually specify the --changelog flag.

To the git error I’m a bit puzzled, could you run with:

cz --debug bump

and share the output with us?

also:

which cz

The commit is not created probably because it fails to create the commit before 🤔

0reactions
Lisandra-devcommented, Jan 7, 2022

I up this. Each time I want to use cz bump, it blocks at the tag creation : it updates the file, and block. So I need to :

  • Revert in the file the version.
  • use cz bump -ch to manually update the changelog
  • use git push to update with the changelog. With that, it seems to block at the push ? Here is my log :
$ cz bump
bump: version 0.4.0 → 0.5.0
tag to create: v0.5.0
increment detected: MINOR

git.commit error: ""

$ cz bump -ch
Tag v0.5.0 could not be found.
Possible causes:
- version in configuration is not the current version
- tag_format is missing, check them using 'git tag --list'

? Is this the first tag created? No
[NO_COMMITS_FOUND]
No new commits found.
$ git tag --list
v0.1.0
v0.2.0
v0.3.0
v0.4.0
$ git tag v0.5.0
$ git tag --list
v0.1.0
v0.2.0
v0.3.0
v0.4.0
v0.5.0
$ cz bump -ch   
[NO_COMMITS_FOUND]
No new commits found.
$ git tag --d v0.5.0
$ cz bump -ch 
$ git push

(the last log was overwritten because a crash, but after the revert file, it works)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bump - Commitizen
The version is bumped automatically based on the commits. ... To fix it, you'll first git checkout . to reset to the status...
Read more >
cz bump fails when using pre-commit to check ... - GitHub
We can use git commit --no-verify to bypass this error for the "bump" command since we don't have to check when bumping. @woile...
Read more >
pathspec 'commit' did not match any file(s) known to git - Stack ...
Whenever I use git commit -m , I receive an error message saying: git commit error:pathspect 'commit' did not match any file(s) known...
Read more >
commitizen 2.37.1 - PythonFix.com
The commitizen-tools/commitizen repo was created 5 years ago and was last ... cz bump return git.commit error : ""; No tag found to...
Read more >
Git-cz — utility for Rust // Lib.rs
It returns a non zero exit code if some commits are not conventional. This is useful in a pre-push hook. git-cz check $remote_sha..$local_sha....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found