I've been digging through the git merge and rebase docs, and something isn't sinking in. I'm actively working on a project in Git, and need to share specific milestones with other developers. I want to share the code exactly as it is at each milestone / release, but not all of my small commits leading up to each release.
How do I create a release branch that mirrors a development branch, where the commits on the release branch each contain several commits from the development branch? In other words, the release branch should have a compressed history, but otherwise match the development branch.
Originally, I had thought that using a separate branch and using git merge --squash would be effective, creating a new branch with a series of commits that reflect the full set of changes between each release. I now understand that git merge --squash doesn't work for repeated uses.
Git rebase would work to collapse several commits into one large commit, but because it changes the commit history, wouldn't change my private history as well as the public releases?
I don't want to lose my history of small changes, but want to push combined commits to a shared server.