{"thread":{"id":"24386","subject":"Merging branches","startedAt":"2010-07-13T21:28:49Z","lastAt":"2010-07-14T05:24:52Z","messageCount":3,"participants":["jhapk","Ævar Arnfjörð Bjarmason","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"145469","messageId":"1279056529462-5289861.post@n2.nabble.com","threadId":"24386","inReplyTo":null,"subject":"Merging branches","fromName":"jhapk","fromEmail":"pradeep.kumar.jha@gmail.com","sentAt":"2010-07-13T21:28:49Z","receivedAt":"2010-07-13T21:28:49Z","isPatch":false,"sender":{"key":"pradeep.kumar.jha@gmail.com","avatar":null},"body":"\nhttp://git.661346.n2.nabble.com/file/n5289861/git.jpg git.jpg \n\nHi,\n\nI have a git history which looks something like as in the figure above. I\nwant to merge Branch A in Branch B. However, the commits a1, a2 and a3 are\nugly and so I don't want those commits in my Branch B log. Is there anyway\nthat I can only pull the final form of Branch A without pulling the whole\nhistory of Branch A?\n\nThanks\n-- \nView this message in context: http://git.661346.n2.nabble.com/Merging-branches-tp5289861p5289861.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"145477","messageId":"AANLkTikPdOVCs5aB7Gs5QCFGDIgBm00DO5XPkP39mzIW@mail.gmail.com","threadId":"24386","inReplyTo":"1279056529462-5289861.post@n2.nabble.com","subject":"Re: Merging branches","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-07-13T22:05:17Z","receivedAt":"2010-07-13T22:05:17Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jul 13, 2010 at 21:28, jhapk <pradeep.kumar.jha@gmail.com> wrote:\n> I have a git history which looks something like as in the figure above. I\n> want to merge Branch A in Branch B. However, the commits a1, a2 and a3 are\n> ugly and so I don't want those commits in my Branch B log. Is there anyway\n> that I can only pull the final form of Branch A without pulling the whole\n> history of Branch A?\n\nYes, you use rebase to squash or drop those commits, and then merge the branch.\n"},{"id":"145513","messageId":"AANLkTimFGQg1KEqpVBvifrLR8_BH_p6s6qswn614s58q@mail.gmail.com","threadId":"24386","inReplyTo":"AANLkTikPdOVCs5aB7Gs5QCFGDIgBm00DO5XPkP39mzIW@mail.gmail.com","subject":"Re: Merging branches","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2010-07-14T05:24:52Z","receivedAt":"2010-07-14T05:24:52Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Tue, Jul 13, 2010 at 6:05 PM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Tue, Jul 13, 2010 at 21:28, jhapk <pradeep.kumar.jha@gmail.com> wrote:\n>> I have a git history which looks something like as in the figure above. I\n>> want to merge Branch A in Branch B. However, the commits a1, a2 and a3 are\n>> ugly and so I don't want those commits in my Branch B log. Is there anyway\n>> that I can only pull the final form of Branch A without pulling the whole\n>> history of Branch A?\n>\n> Yes, you use rebase to squash or drop those commits, and then merge the branch.\n\nOr just \"git merge --squash\".\n\nHave fun,\n\nAvery\n"}]}