I would like to do the following in a script:
git merge --squash someBranch
git push
The problem is that the merge does not do a commit. So before the push I have to commit. The default commit message created by this merge is sufficient. So my questions are:
Can I do the merge with automatically generating the commit?
Or can I add a command in the script to do a commit which accepts the default message?
Thanks!
The default commit message after a merge is in .git/MERGE_MSG
, so you could do the following:
git commit -F .git/MERGE_MSG
... after the merge.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With