I'm often running
git subtree pull -P shared shared master
but I usually forget to put --squash
at the end which ends up duplicating most of my git history. Is it possible to make git use that by default?
Thanks!
I'm often running
git subtree pull -P shared shared master
but I usually forget to put --squash
at the end which ends up duplicating most of my git history. Is it possible to make git use that by default?
Thanks!
You can use:
git config branch.master.mergeoptions "--squash"
or if you want this behavior to be global to all your git
projects:
git config --global branch.master.mergeoptions "--squash"
Edit:
As Ingo pointed out, this solution will apply the --squash
option to merge
operations in general.