"yarn version" should have an option to not commit to Git
Do you want to request a feature or report a bug? Feature
What is the current behavior?
yarn version --new-version 1.2.3 always commits to Git. There's an ugly workaround: You can set the YARN_VERSION_GIT_TAG environment variable to an empty string:
YARN_VERSION_GIT_TAG='' yarn version --new-version 1.2.3
This is because version.js uses Boolean(config.getOption('version-git-tag')), and base-registry.js populates overrides for these config options from the environment variables. Since it uses the Boolean function and all environment variables are strings, the only value that works to disable it is an empty string.
What is the expected behavior?
A --no-commit or --no-git-tag-version flag: Something like yarn version --new-version 1.2.3 --no-commit should update the version number without committing it. npm calls this --no-git-tag-version.
@Daniel15 I'll give this a shot today!
Does this still work the same way as it did after #1243 was merged? Using --no-git-tag-version doesn't seem to be working for me... The YARN_VERSION_GIT_TAG='' yarn version ... trick still works though.