Should be optionnal, or be triggered by the merge strategy chosen to merge the target_branch initially.
As per the squash question, I guess the answer would be "quite easy":
In backport_commits (main.py:20) where holding every commit hash there is in that branch in commits. According to this SO https://stackoverflow.com/a/5201642, we could use the first hash in commits to do something like:
git('reset', '--soft', first_hash')
git('commit')
And then git(push) as it's currently done in line 35.
Should be optionnal, or be triggered by the merge strategy chosen to merge the target_branch initially.