![]() Some options:Įdit the commit message before committing.Īppend to the commit message a line indicating the original commit. The argument to git cherry-pick is a set of commits to apply, using the syntax described in Chapter 8. If there is an upstream feature you need that the distribution does not provide (and they use Git), you canât just merge it in, as your repository is not a clone of theirsâbut you may be able to apply the relevant commits individually by cherry-picking. Or, suppose you have your own repository for holding local changes made to your Unix distributionâs derivative of some open source project, such as Apache or OpenLDAP as modified and repackaged by Red Hat or Debian. For example, you might discover that a bug fix applied to a certain version actually needs to be applied to an earlier one as well, and merging in that direction is not desirable. Any arrangement of branches and merge discipline favors a certain flow of changes, and sometimes you need to buck that flow. As a very general rule, itâs best to avoid this in favor of factoring your work so that a commit appears in one place and is incorporated in multiple branches via merging instead, but that isnât always possible or practical. This even resolves stuff, like in revno 29.2.3 where the master branch is merged into the feature branch (fix-408) to get fix-408 up to date.Git cherry-pick allows you to apply the changeset of a given commit as a new commit on the current branch, preserving the original author information and commit message. The top level merges are in order by commit/date, while the sub-commits in each branch and in order with respect to their parent, not the entire repo! It looks like the problem can be solved by calling finish Changed out the logo, and force a size during the signonįixed bug #404 - Pressing back in the preferences exits the application This is what happens when you call `bzr log -include-merged` to show not just the top level merges/commits, but also the sub-commits from each merge:įixed bug #408 - Make the interface prettierĪdded directories for other layouts. And if you wanted to see more than that, it grouped merges together. By default, it only showed first parents (direct commits or merges). It clutters your log and makes it really hard to tell what is going on and what commits are related to each other.īazaar's (now called breezy) log (which we used before moving to git) was really nice. It is frustratingly hard to see what actually happened, because subcommits from that merge branch show up in the past in your linear timeline and aren't grouped together. And if the default view of `git log` wasn't so terrible (if it acted like git log -first-parent), then I think a lot more people would do that too.īut I understand why people who just use `git log` complain with merge commits. If git log's default behavior wasn't so terrible, I don't think this argument would even come up so often.Įxactly. Unfortunately, `git log` shows everything, which is why I advocate for `git log -first-parent` being the default. Absolutely Not! I just want a single merge commit that brings in your whole branch. ![]() ![]() Now, do I want all that detail once your branch is in master. With the 40 commits, I can trace back through your work, and understand your challenges (sometimes seeing 5 commits in a row with 'trying to get X to work' is really useful). I'd much rather see 40 commits across two weeks on your branch than one "clean" commit with everything. Erasing that by rebasing/squashing for a "clean" log isn't worth it in my opinion. Git should be used like an audit log, where you can trace the thought process and actions of your developers. If you are rebasing, then when I review your feature branch, I have no idea if you had conflicts, and if so, how many and how you resolved them. ![]() If there is a conflict that you have to resolve in your feature branch, then there is a clear place where you did it, and that can be double checked. Those merges from master into a feature branch are useful though. ![]()
0 Comments
Leave a Reply. |