Skip to content
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

Add create_branch option to force create a new branch #203

Merged
merged 8 commits into from Feb 27, 2022

Conversation

stefanzweifel
Copy link
Owner

This PR is yet another attempt to solve the problem of "what should happen if the given branch does not exist yet".
As previous attempts failed and broke the action for all userrs, I've decided to add a new option called create_branch to make this basically an opt-in feature.

By default create_branch is false and using a branch-name that doesn't exist yet, fails the action with "fatal: invalid reference: not-existend-branch".

Setting create_branch to true, we use the -B-option of git-checkout to create a new branch. From there the Action works like before and pushes the commit to the remote branch.

Related Issues and PRs

@stefanzweifel stefanzweifel merged commit ebe7739 into master Feb 27, 2022
@stefanzweifel stefanzweifel deleted the feature/create-branch-if-not-exists branch February 27, 2022 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant