Skip to content

fix: Configure git pull to rebase instead of merge #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 10, 2022

Conversation

Kurt-von-Laven
Copy link
Contributor

If the branch has not been updated while the action is running, then the pull will be a no-op either way, and the push will succeed. If the branch has been updated since the repository was initially checked out, then rebase rather than merge when pulling so that no merge commit will be created. If the rebase can not be performed non-interactively, then it will fail immediately, and there's nothing further that can be done. Configuring pull behavior has the added benefit of eliminating a twelve-line warning from Git about pulling without specifying how to reconcile divergent branches.

Fixes #26.

Use the new --show-current arg to branch in place of git rev-parse.
git push --tags already pushes both lightweight and annotated tags.
If the branch has not been updated while the action is running, then the
pull will be a no-op either way, and the push will succeed. If the
branch has been updated since the repository was initially checked out,
then rebase rather than merge when pulling so that no merge commit will
be created. If the rebase can not be performed non-interactively, then
it will fail immediately, and there's nothing further that can be done.
Configuring pull behavior has the added benefit of eliminating a
twelve-line warning from Git about pulling without specifying how to
reconcile divergent branches.
@woile woile merged commit 29b7249 into commitizen-tools:master May 10, 2022
@Kurt-von-Laven Kurt-von-Laven deleted the no-merge-commits branch May 10, 2022 17:44
@Kurt-von-Laven
Copy link
Contributor Author

Kurt-von-Laven commented May 10, 2022

@woile, I believe because this change was merged at the exact same minute as #32, it got left out of the 0.13.1 release. See the failed bump.

@woile
Copy link
Member

woile commented May 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't Create Merge Commits
2 participants