Description
Git outputs the following warning, because the Commitizen action runs git pull
without first configuring it:
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Since the Commitizen action pulls immediately before pushing, it will create a merge commit in the event that the remote branch was pushed to externally while the action was running. Some projects disallow merge commits, and if there are any conflicts that need to be resolved, the action will fail regardless of the branch reconciliation strategy. Hence, the most universally palatable option is to configure Git to rebase on pull so that it will still succeed without creating a merge commit if it's able to perform a non-interactive rebase. The twelve-line warning also distracts a bit from the more meaningful content in the logs, particularly since it's at the end where the most important log output is often found.