Pardon my ignorance here, but I'm attempting to put the "git-flow" model into practice (manually, without the git-flow toolset).
One concept I found interesting was the idea that there would be a master branch for which every commit was a bona-fide workable release. So you have your v1.0.0 commit on master tagged, then your v1.1.0 tag, and that's a nice 2-commit-long log when viewing master. But then you're ready to release v1.2.0 and your develop
branch has 1000 intermediate commits, but you're ready to sign off and push the button to say "all right, it's release time".
My goal is to add a third commit onto the master timeline. I can see that the --squash
option will let you add a single commit onto the master, so you view the master log and see your three commits: v1.0.0, v1.1.0, and v1.2.0. As lengthy and verbose as the develop branch may be, the squashing gets you down to a neat history for master where each version is an official release...no chance of grabbing an intermediate development commit off that!
It works, but the thing that troubled me is that looking in the network graph this produces a "disconnected" commit. There's no apparent relationship that Git understands tying this squashed third commit to all those thousands of additions to the develop branch. It seems to float alone, unlike the git-flow diagrams which are hand-drawn and always point things to things.
Other options for merging which get the "merge arrow" (a.k.a. the multiple parents) seem to have the side effect of establishing a connection to the intermediate commits. So suddenly master isn't just these 3 blessed commits...it has expanded to include the full history of all these 1000 commits on develop. Kind of seems to defeat the purpose, if the point of master was to be a branch containing only releasable versions...but suddenly every intermediate state has a commit on master. 1003 instead of 3 master commits.
Git visualization is a bit sinister in that it glosses over duplication in branches. So the diagrams I see drawn on git-flow are pictures and not terminal printouts of git log
etc. I am unsure what one is to expect from a statement like saying that master only consists of releasable versions.
Long story short: I can't find options that retain the "arrow-looking" relationship between develop and master at a release point unless they carry the full commit history. Should this worry me if I look at git-flow diagrams which have lots of arrows? In the scenario I outlined, should I look at the master history and see every intermediate develop version that was merged and a 1003 commit history, or the 3 commit history?