![]() ![]() "goddamn idiotic truckload of sh*t": when it breaks.Angels sing, and a light suddenly fills the room. "global information tracker": you're in a good mood, and it actually works for you.Take your pick from the dictionary of slang. The fact that it is a mispronunciation of "get" may or may not be relevant. random three-letter combination that is pronounceable, and not actually used by any common UNIX command.He described the tool as "the stupid content tracker" and the name as (depending on your way): The name "git" was given by Linus Torvalds when he wrote the very first version. When merging branches, git keeps track of the fact competing changes were made to foo.js, and it remembers how the conflict was resolved so you don't need to do it again.Įvery cherry pick is an opportunity to lose history in a version control system hell-bent on retaining history up to the point they had to create a garbage collector for commits that were no longer reachable from a branch (see git gc or git prune).The following is taken directly from the wikipedia article about Git and pretty much sums up my week. Will you remember why your change was taken originally? Will the proper change be applied correctly twice, even though nobody has touched foo.js in 2 weeks? Guess what? You get to resolve that merge conflict on line 25 of foo.js again. Time passes, and you decide it is time to cherry pick that commit from develop to master. ![]() Cherry picking my commit from master results in a merge conflict you must resolve manually. You make a different change to line 25 of foo.js in develop. For example, I make a change to foo.js on line 25, and this change is in master, but not develop. Merged history, especially if people properly rebase their work before merging or pushing, is easier to read, and trace back in time.īeyond reading better, a shared history also ensures you do not need to resolve the same merge conflict more than once. Rather than making history easier to read, if becomes harder to read for the very reason you already have in your question. Cherry picking commits is also merging, but the resulting history of that branch does not recognize that history has been combined. This sounds like people are afraid of merging. Always cherry picking develop to master is an anti pattern with no clear benefit or goal. It keeps history diverged in a system where merging history is desirable, and makes incorporating changes from multiple people easier. This is a specific workflow outside of merging, because combining the history of two branches brings over more commits then you need.Īlways cherry picking, regardless of the branches involved, defeats the purpose of version control. QuestionĪre there benefits to cherry-picking instead of merging? And is there anything that we would lose by using this approach over traditional merging?Ĭherry picking commits is useful when you need a specific change in multiple branches where merging other history is not desirable. So I'm really interested in hearing people's experiences / thoughts about this. But I'm just a mid-level engineer with less than 10 years of professional experience. ![]() At the same time I can't see any benefits to this approach. Other that that though, I can't really think of any reasons this would be a bad idea. And, we merge using the -no-ff option, meaning we can revert entire features if needed. Alternatively we could cherry pick from develop to a release branch (based on master), then merge into master.Īt first I was opposed to this, because it would flatten the history out. After a few cherry-picks, we deploy it and that's our release. ![]() One of the approaches we've been talking about is that instead of merging develop into master, we instead cherry-pick develop's commits into master. When we have a hotfix, we independently merge it into both develop and master. We don't have release branches we just merge develop directly into master once we feel like it's well tested enough. We currently follow git-flow pretty closely. At work we've been trying to find a new workflow. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |