{"thread":{"id":"42458","subject":"[feature request] find git commit log before rebase","startedAt":"2016-05-26T16:55:26Z","lastAt":"2016-05-27T02:57:37Z","messageCount":3,"participants":["ryenus","Sebastian Staudt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"287595","messageId":"CAKkAvax5Yf2=qLhVkn8EgkNEgHL97Doxr3JWR10aqxksYVsYXA@mail.gmail.com","threadId":"42458","inReplyTo":null,"subject":"[feature request] find git commit log before rebase","fromName":"ryenus","fromEmail":"ryenus@gmail.com","sentAt":"2016-05-26T16:55:26Z","receivedAt":"2016-05-26T16:55:26Z","isPatch":false,"sender":{"key":"ryenus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/610161?v=4"},"body":"Assuming I have branches master (m), and a side branch (b), with a\nhistory tree like below:\n\nm0 --- m1 -- m2 -- m3 -- m4 --- master (m)\n        \\          /      \\\n        b1 ------ b2       b3 -- b4 -- branch (b) (HEAD)\n                  |\n      (tag:POINT_BEFORE_REBASE)\n\nThe history of branch b is can be described as:\n\n1. branch b is forked at point of m1\n2. branch b is merged to master into m3,\n3. branch b then is rebased (fast-forward) from b2 to m4\n4. then branch b started its new life as b3 b4 after rebase\n\nWith the following command: I can find b3 and b4 since last fork-point\n\n    git log --oneline $(git merge-base --fork-point master)..b\n\nBut how to find out commits b1 b2, given the fact that b2 is the point\nbefore rebase?\n\nI understand it can be achieved via:\n\n    git log --oneline m2..b2\n\nThat's because I know b2 is the point before rebase,\nand m2 is another child of the subsequent merge commit m3\n\nI wonder how to do this with an simple (enough) command without me\nlooking through the history and find b2 and m2 manually?\n\nThanks!\n"},{"id":"287610","messageId":"CA+xP2SZgYYcQOVcWQsEY2YccW3cwONOhXOvViCfH2ONvm5-G8g@mail.gmail.com","threadId":"42458","inReplyTo":"CAKkAvax5Yf2=qLhVkn8EgkNEgHL97Doxr3JWR10aqxksYVsYXA@mail.gmail.com","subject":"Re: [feature request] find git commit log before rebase","fromName":"Sebastian Staudt","fromEmail":"koraktor@gmail.com","sentAt":"2016-05-26T20:37:37Z","receivedAt":"2016-05-26T20:37:37Z","isPatch":false,"sender":{"key":"koraktor@gmail.com","avatar":"https://avatars.githubusercontent.com/u/66112?v=4"},"body":"Hi.\n\nI think what you want is `git reflog` (http://git-scm.com/man/reflog).\n\ngit reflog b\n\nWill tell you the commits b pointed to in the past.\n\nBest regards,\n    Sebastian\n\n2016-05-26 18:55 GMT+02:00 ryenus <ryenus@gmail.com>:\n> Assuming I have branches master (m), and a side branch (b), with a\n> history tree like below:\n>\n> m0 --- m1 -- m2 -- m3 -- m4 --- master (m)\n>         \\          /      \\\n>         b1 ------ b2       b3 -- b4 -- branch (b) (HEAD)\n>                   |\n>       (tag:POINT_BEFORE_REBASE)\n>\n> The history of branch b is can be described as:\n>\n> 1. branch b is forked at point of m1\n> 2. branch b is merged to master into m3,\n> 3. branch b then is rebased (fast-forward) from b2 to m4\n> 4. then branch b started its new life as b3 b4 after rebase\n>\n> With the following command: I can find b3 and b4 since last fork-point\n>\n>     git log --oneline $(git merge-base --fork-point master)..b\n>\n> But how to find out commits b1 b2, given the fact that b2 is the point\n> before rebase?\n>\n> I understand it can be achieved via:\n>\n>     git log --oneline m2..b2\n>\n> That's because I know b2 is the point before rebase,\n> and m2 is another child of the subsequent merge commit m3\n>\n> I wonder how to do this with an simple (enough) command without me\n> looking through the history and find b2 and m2 manually?\n>\n> Thanks!\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"287641","messageId":"CAKkAvaxT16Xx9gKoyMx_a=QBGAfMgYYwMvdGmDXA-0_qGO17gA@mail.gmail.com","threadId":"42458","inReplyTo":"CA+xP2SYXUCfLHcyfQu6SLhZ6jRptp3gK0myatKVUxyP-2B=dPQ@mail.gmail.com","subject":"Re: [feature request] find git commit log before rebase","fromName":"ryenus","fromEmail":"ryenus@gmail.com","sentAt":"2016-05-27T02:57:37Z","receivedAt":"2016-05-27T02:57:37Z","isPatch":false,"sender":{"key":"ryenus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/610161?v=4"},"body":"Indeed, specifying the branch name does the trick\nand this works with `git reflog` and/or `git log --walk-reflogs`\n\nThank you very much!\n\nOn 27 May 2016 at 01:58, Sebastian Staudt <koraktor@gmail.com> wrote:\n> Hi.\n>\n> I think what you want is `git reflog` (http://git-scm.com/man/reflog).\n>\n> git reflog b\n>\n> Will tell you the commits b pointed to in the past.\n>\n> Best regards,\n> Sebastian\n> ryenus <ryenus@gmail.com> schrieb am Do., 26. Mai 2016 um 19:03:\n>>\n>> Assuming I have branches master (m), and a side branch (b), with a\n>> history tree like below:\n>>\n>> m0 --- m1 -- m2 -- m3 -- m4 --- master (m)\n>>         \\          /      \\\n>>         b1 ------ b2       b3 -- b4 -- branch (b) (HEAD)\n>>                   |\n>>       (tag:POINT_BEFORE_REBASE)\n>>\n>> The history of branch b is can be described as:\n>>\n>> 1. branch b is forked at point of m1\n>> 2. branch b is merged to master into m3,\n>> 3. branch b then is rebased (fast-forward) from b2 to m4\n>> 4. then branch b started its new life as b3 b4 after rebase\n>>\n>> With the following command: I can find b3 and b4 since last fork-point\n>>\n>>     git log --oneline $(git merge-base --fork-point master)..b\n>>\n>> But how to find out commits b1 b2, given the fact that b2 is the point\n>> before rebase?\n>>\n>> I understand it can be achieved via:\n>>\n>>     git log --oneline m2..b2\n>>\n>> That's because I know b2 is the point before rebase,\n>> and m2 is another child of the subsequent merge commit m3\n>>\n>> I wonder how to do this with an simple (enough) command without me\n>> looking through the history and find b2 and m2 manually?\n>>\n>> Thanks!\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}