Question:
How do you preserve the branch merge workflow using git reset --soft
Why:
I'm trying to make some auto versioning Git actions. And the 1st implementation is making two (2) nodes indicating a pull request and an autoversioning.
I'm trying to use the following code in the git action to combine the changes
- name: Soft Reset to add changes to PR
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git reset --soft "HEAD~2"
git commit --amend --message="Version ${{ env.MYVERSION }}"
git push --force
What happens is that it properly combines the two (2) commits, but it breaks the diagonal line in the workflow signaling that the branches were merged.
I feel like I'm close, but I'm missing a key item.
2nd bonus question. How would I merge the two commits messages? 'cause I get the new message I force, but I would like the PR commit message too if possible.
Thank you for your time and consideration.