Reputation: 69747
I'm using a forked repo on GitHub and from time to time I need to merge in work on the real ("upstream") repo, as described here.
I would love to squash their changes like this
git pull https://github.com/mixedinkey-opensource/MIKMIDI.git MIDIFiles --squash
but... will my stuff be automatically merge-able with the upstream repo later? Or will those squashed commits cause my repo to differ greatly from the upstream repo, even if my changes were very few?
Upvotes: 2
Views: 673
Reputation: 1323523
Even for subtree, a pull --squash can be troublesome
That command is more used on the integrator side, when you merge a PR (Pull Request) branch into your original repo (in order to get only one commit).
See for instance "Merging a PR (yours or contributors)"
Remember that pull requests are equivalent to a remote github branch with potentially a multitude of commits.
In this case it is recommended to squash remote commit history to have one commit per issue, rather than merging in a multitude of contributor's commits.
In order to do that, as well as close the PR at the same time, it is recommended to use squash commits.
So in your case, it is recommended to not use squash.
Upvotes: 2