7 ms·
But commits change branches. None of the commits started on the "master" branch, they started on some developer's branch (which might also be called "master" in
by zeroimpl 5y ago
But commits change branches. None of the commits started on the "master" branch, they started on some developer's branch (which might also be called "master" in a different repo, but is still separate).
- derriz 5y agoI'm not sure I understand your point? Say for example, I'm looking at a freshly cloned repo. There's a first commit and most-recent commit on master - I can identify them with git-log. The problem is that I cannot view the path of commits between these two if I'm only interested in the commits made when the current branch was master (which is generally the case unless I want to drill into a feature branch). Disallowing merges makes the problem go away but that removes a lot of options in terms of work-flow.
- jhardy54 5y agoWould `git log --merges` solve this? Assuming you use a merge-based workflow this would show only merge commits without any of the details of each individual commit from the merged branch.
- zeroimpl 5y agoI don't follow - If you are on a freshly cloned repo, none of the commits were made when the current branch was master, they were made on another user's git repo before your repo existed.
- jlokier 5y ago> I'm only interested in the commits made when the current branch was master When I'm working none of the commits are made when the current branch was master. They are made on branches, where commits are finalised, tested and signed, and then master is fast-forwarded to match the branch tip commit (or something intermediate if I'm satisfied with that). Conflicts are detected by the fast-forward and reconciled locally in the branch, re-tested and signed off again. It's rare that the current branch is master, and no commits are created while on master. So what would you like to see?