{"thread":{"id":"26901","subject":"how to squash two commits into only one","startedAt":"2011-03-29T05:42:27Z","lastAt":"2011-03-30T19:22:21Z","messageCount":14,"participants":["Lynn Lin","Tor Arntsen","Alex Riesen","Joshua Juran","Nguyen Thai Ngoc Duy","Will Palmer","Junio C Hamano","Dirk Süsserott"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"164527","messageId":"AANLkTi=B37GABBc-YWfJN29Mh0kx4Tn8KenD5dJFo9j1@mail.gmail.com","threadId":"26901","inReplyTo":null,"subject":"how to squash two commits into only one","fromName":"Lynn Lin","fromEmail":"lynn.xin.lin@gmail.com","sentAt":"2011-03-29T05:42:27Z","receivedAt":"2011-03-29T05:42:27Z","isPatch":false,"sender":{"key":"lynn.xin.lin@gmail.com","avatar":null},"body":"All,\n   I have only have two commits in repo,then I want to squash these\ntwo commit into one through git rebase -i .However it fails\n\n$ git rebase -i HEAD^1\nit only show up one commit so can't squash (can't squash without a\nprevious commit)\n\n\nAny help on this?\n\nThanks\nLynn\n"},{"id":"164528","messageId":"AANLkTi=uqCm6cZa1c0VDig8MXKxupZWHdtKW2N36RtoU@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTi=PZY2d+NhNnnOyXMX70N31vRg3qS5er+hECy8A@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Lynn Lin","fromEmail":"lynn.xin.lin@gmail.com","sentAt":"2011-03-29T06:04:06Z","receivedAt":"2011-03-29T06:04:06Z","isPatch":false,"sender":{"key":"lynn.xin.lin@gmail.com","avatar":null},"body":"On Tue, Mar 29, 2011 at 1:59 PM, Henrik Hautakoski <henrik@fiktivkod.org> wrote:\n> You can do a soft reset and amend the changes to the root commit.\n> git reset HEAD^1\n> (add the files)\n> git commit --amend\n\nreally good!\n\nThanks\nLynn\n\n> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>>\n>> All,\n>>   I have only have two commits in repo,then I want to squash these\n>> two commit into one through git rebase -i .However it fails\n>>\n>> $ git rebase -i HEAD^1\n>> it only show up one commit so can't squash (can't squash without a\n>> previous commit)\n>>\n>>\n>> Any help on this?\n>>\n>> Thanks\n>> Lynn\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>\n>\n>\n> --\n> Henrik Hautakoski\n> henrik@fiktivkod.org\n>\n"},{"id":"164530","messageId":"AANLkTi=5e4WUuZHcEJD50yJTw2eyYN_dN1S_7z62qy88@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTi=B37GABBc-YWfJN29Mh0kx4Tn8KenD5dJFo9j1@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2011-03-29T06:15:58Z","receivedAt":"2011-03-29T06:15:58Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n> All,\n>   I have only have two commits in repo,then I want to squash these\n> two commit into one through git rebase -i .However it fails\n>\n> $ git rebase -i HEAD^1\n> it only show up one commit so can't squash (can't squash without a\n> previous commit)\n\nTo squash commits with rebase -i:\ngit log\n(identify the commit you wish to squash to)\ngit rebase -i <the commit _before_ the one you want to squash to)\n\ne.g.\ngit log\n1\n2\n3\n4\n..\nyou want to squash 2 into 3: Use git rebase -i 4\n(4 is really a hash of course).\n\nHEAD^some-value is OK sometimes but when I want to fix stuff down in\nthe commit chain somewhere I find it simpler to use the hashes - just\nmark and paste.\nAnyway the real point is that with rebase -i you must specify the last\ncommit _before_ the range you want to work with.\n\n-Tor\n"},{"id":"164549","messageId":"AANLkTin-0cBa293CQSf4kwMUG=w2j5zkSz1oBDhNqaNe@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTi=5e4WUuZHcEJD50yJTw2eyYN_dN1S_7z62qy88@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Lynn Lin","fromEmail":"lynn.xin.lin@gmail.com","sentAt":"2011-03-29T08:24:55Z","receivedAt":"2011-03-29T08:24:55Z","isPatch":false,"sender":{"key":"lynn.xin.lin@gmail.com","avatar":null},"body":"On Tue, Mar 29, 2011 at 2:15 PM, Tor Arntsen <tor@spacetec.no> wrote:\n> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>> All,\n>>   I have only have two commits in repo,then I want to squash these\n>> two commit into one through git rebase -i .However it fails\n>>\n>> $ git rebase -i HEAD^1\n>> it only show up one commit so can't squash (can't squash without a\n>> previous commit)\n>\n> To squash commits with rebase -i:\n> git log\n> (identify the commit you wish to squash to)\n> git rebase -i <the commit _before_ the one you want to squash to)\n>\n> e.g.\n> git log\n> 1\n> 2\n> 3\n> 4\n> ..\n> you want to squash 2 into 3: Use git rebase -i 4\n> (4 is really a hash of course).\n>\n> HEAD^some-value is OK sometimes but when I want to fix stuff down in\n> the commit chain somewhere I find it simpler to use the hashes - just\n> mark and paste.\n> Anyway the real point is that with rebase -i you must specify the last\n> commit _before_ the range you want to work with.\n\nThanks .However my case is like:\ngit log\n1\n2\n\nI want to squash 1 to 2,what's the commit I should specify with rebase -i\n\n> -Tor\n>\n"},{"id":"164551","messageId":"AANLkTikLuGh6VRReWvu4yT1v2VE_FXPBCx+9kXMX1Mni@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTin-0cBa293CQSf4kwMUG=w2j5zkSz1oBDhNqaNe@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2011-03-29T08:50:57Z","receivedAt":"2011-03-29T08:50:57Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Tue, Mar 29, 2011 at 10:24, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n\n> Thanks .However my case is like:\n> git log\n> 1\n> 2\n>\n> I want to squash 1 to 2,what's the commit I should specify with rebase -i\n\nThat would be 3, i.e. rebase -i 3\n\nThat won't work if there are only two commits in total.. rebase needs\na commit before the one you want to squash to. But in that case you\nwould do 'git reset HEAD^1' (and end up with only commit 2, and 'M'\nfor the modifications originally done in commit 1), 'git add' <the\nfiles changed>, 'git commit --amend', which is exctly what Henrik\ndescribed earlier.\n\nThere is a particular problem if you have this sequence:\ngit log\n 1\n 2\n 3\n 4\n 5  (initial commit)\n\nand you want to squash 4 into 5.. there's no hash 6 to rebase -i to.\nThere are several ways to do it, but what I do is something like this:\ngit checkout 4\ngit checkout -b tmp\ngit reset HEAD^1\n<add files>\ngit commit --amend\ngit merge master\ngit branch -M tmp master (<---- rename the tmp branch to 'master')\n\nthe new master now has 4 and 5 squashed.\n\nI'm sure others on this list have different ways to do this, but it's\nthe one method that looked obvious to me so that's what I did when I\nneeded it (anyway it's more or less how I fixed historic commits in\nthe past before I learned about 'rebase -i' .. well, rebase -i didn't\neven exist with the versions of Git I used back then anyway).\n\n-Tor\n"},{"id":"164554","messageId":"AANLkTi=7TNjLVrcJVppiULBnDdKCM_vqwhn1JqoW+DQo@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTi=B37GABBc-YWfJN29Mh0kx4Tn8KenD5dJFo9j1@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2011-03-29T09:38:45Z","receivedAt":"2011-03-29T09:38:45Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n> All,\n>   I have only have two commits in repo,then I want to squash these\n> two commit into one through git rebase -i .However it fails\n>\n> $ git rebase -i HEAD^1\n> it only show up one commit so can't squash (can't squash without a\n> previous commit)\n\n$ git rebase -i HEAD~2\n\n8-]\n"},{"id":"164556","messageId":"AANLkTimsN40twLwOWXsQqbv0SVN7T9rEHSUpcVum8aFR@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTi=7TNjLVrcJVppiULBnDdKCM_vqwhn1JqoW+DQo@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Lynn Lin","fromEmail":"lynn.xin.lin@gmail.com","sentAt":"2011-03-29T10:10:05Z","receivedAt":"2011-03-29T10:10:05Z","isPatch":false,"sender":{"key":"lynn.xin.lin@gmail.com","avatar":null},"body":"On Tue, Mar 29, 2011 at 5:38 PM, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>> All,\n>>   I have only have two commits in repo,then I want to squash these\n>> two commit into one through git rebase -i .However it fails\n>>\n>> $ git rebase -i HEAD^1\n>> it only show up one commit so can't squash (can't squash without a\n>> previous commit)\n>\n> $ git rebase -i HEAD~2\n>\nonly have two commits\n> 8-]\n>\n"},{"id":"164559","messageId":"AANLkTikX5YvMrooVi-7e-YDrCP_7QHqL6wR=1bY1cZ2L@mail.gmail.com","threadId":"26901","inReplyTo":"AANLkTimsN40twLwOWXsQqbv0SVN7T9rEHSUpcVum8aFR@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2011-03-29T10:58:07Z","receivedAt":"2011-03-29T10:58:07Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Mar 29, 2011 at 12:10, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n> On Tue, Mar 29, 2011 at 5:38 PM, Alex Riesen <raa.lkml@gmail.com> wrote:\n>> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>>> All,\n>>>   I have only have two commits in repo,then I want to squash these\n>>> two commit into one through git rebase -i .However it fails\n>>>\n>>> $ git rebase -i HEAD^1\n>>> it only show up one commit so can't squash (can't squash without a\n>>> previous commit)\n>>\n>> $ git rebase -i HEAD~2\n>>\n> only have two commits\n\nUh. That's unusual.\n\nThan yes, \"git reset HEAD^; git commit --amend\" seems the best solution.\n"},{"id":"164567","messageId":"5A9D499C-26AC-401E-B21A-1F8E03FBAC4B@gmail.com","threadId":"26901","inReplyTo":"AANLkTikX5YvMrooVi-7e-YDrCP_7QHqL6wR=1bY1cZ2L@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Joshua Juran","fromEmail":"jjuran@gmail.com","sentAt":"2011-03-29T12:44:11Z","receivedAt":"2011-03-29T12:44:11Z","isPatch":false,"sender":{"key":"jjuran@gmail.com","avatar":null},"body":"On Mar 29, 2011, at 3:58 AM, Alex Riesen wrote:\n\n> On Tue, Mar 29, 2011 at 12:10, Lynn Lin <lynn.xin.lin@gmail.com>  \n> wrote:\n>> On Tue, Mar 29, 2011 at 5:38 PM, Alex Riesen <raa.lkml@gmail.com>  \n>> wrote:\n>>> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com>  \n>>> wrote:\n>>>> All,\n>>>>   I have only have two commits in repo,then I want to squash these\n>>>> two commit into one through git rebase -i .However it fails\n>>>>\n>>>> $ git rebase -i HEAD^1\n>>>> it only show up one commit so can't squash (can't squash without a\n>>>> previous commit)\n>>>\n>>> $ git rebase -i HEAD~2\n>>>\n>> only have two commits\n>\n> Uh. That's unusual.\n>\n> Than yes, \"git reset HEAD^; git commit --amend\" seems the best  \n> solution.\n\nActually, that should be:  `git reset --soft HEAD^; git commit --amend`.\n\nJosh\n"},{"id":"164568","messageId":"AANLkTinjbXzdfkxVRPPSXJj6Z0mMrikzdi2V8N5YAGR-@mail.gmail.com","threadId":"26901","inReplyTo":"5A9D499C-26AC-401E-B21A-1F8E03FBAC4B@gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-03-29T12:49:16Z","receivedAt":"2011-03-29T12:49:16Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Mar 29, 2011 at 7:44 PM, Joshua Juran <jjuran@gmail.com> wrote:\n> On Mar 29, 2011, at 3:58 AM, Alex Riesen wrote:\n>> On Tue, Mar 29, 2011 at 12:10, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>>> On Tue, Mar 29, 2011 at 5:38 PM, Alex Riesen <raa.lkml@gmail.com> wrote:\n>>>> On Tue, Mar 29, 2011 at 07:42, Lynn Lin <lynn.xin.lin@gmail.com> wrote:\n>>>>>  I have only have two commits in repo,then I want to squash these\n>>>>> two commit into one through git rebase -i .However it fails\n>>>>>\n>>>>> $ git rebase -i HEAD^1\n>>>>> it only show up one commit so can't squash (can't squash without a\n>>>>> previous commit)\n>>>>\n>>>> $ git rebase -i HEAD~2\n>>>>\n>>> only have two commits\n>>\n>> Uh. That's unusual.\n>>\n>> Than yes, \"git reset HEAD^; git commit --amend\" seems the best solution.\n>\n> Actually, that should be:  `git reset --soft HEAD^; git commit --amend`.\n\n\"git rebase --root\" does not seem a bad idea though. I need to amend\ninitial commit a few times and end up using \"git reset\" without\n--soft.\n-- \nDuy\n"},{"id":"164569","messageId":"04C85603-1737-42BC-A037-2C45D5315435@gmail.com","threadId":"26901","inReplyTo":"AANLkTinjbXzdfkxVRPPSXJj6Z0mMrikzdi2V8N5YAGR-@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Joshua Juran","fromEmail":"jjuran@gmail.com","sentAt":"2011-03-29T13:12:15Z","receivedAt":"2011-03-29T13:12:15Z","isPatch":false,"sender":{"key":"jjuran@gmail.com","avatar":null},"body":"On Mar 29, 2011, at 5:49 AM, Nguyen Thai Ngoc Duy wrote:\n\n> On Tue, Mar 29, 2011 at 7:44 PM, Joshua Juran <jjuran@gmail.com>  \n> wrote:\n>> On Mar 29, 2011, at 3:58 AM, Alex Riesen wrote:\n>>\n>>> On Tue, Mar 29, 2011 at 12:10, Lynn Lin <lynn.xin.lin@gmail.com>  \n>>> wrote:\n>>>\n>>>> only have two commits\n>>>\n>>> Than yes, \"git reset HEAD^; git commit --amend\" seems the best  \n>>> solution.\n>>\n>> Actually, that should be:  `git reset --soft HEAD^; git commit -- \n>> amend`.\n>\n> \"git rebase --root\" does not seem a bad idea though. I need to amend\n> initial commit a few times and end up using \"git reset\" without\n> --soft.\n\nOr perhaps have `git commit --amend` issue a warning if doesn't  \nactually amend anything.  Sometimes you just want to change the commit  \nmessage, so you wouldn't want a warning in that case.  But other times  \nyou're adding changes and updating the commit message at the same  \ntime, so you'd want a warning if you forgot to git-add or use --soft.   \nA new --fix option to commit could work like --amend, but fail with an  \nerror if no changes are staged.  Another option is for --amend to list  \nthe staged changes in the edit buffer, or a warning when nothing has  \nchanged.\n\nJosh\n"},{"id":"164578","messageId":"1301410939.3012.12.camel@wpalmer.simply-domain","threadId":"26901","inReplyTo":"04C85603-1737-42BC-A037-2C45D5315435@gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Will Palmer","fromEmail":"wmpalmer@gmail.com","sentAt":"2011-03-29T15:02:19Z","receivedAt":"2011-03-29T15:02:19Z","isPatch":false,"sender":{"key":"wmpalmer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/357044?v=4"},"body":"On Tue, 2011-03-29 at 06:12 -0700, Joshua Juran wrote:\n> On Mar 29, 2011, at 5:49 AM, Nguyen Thai Ngoc Duy wrote:\n> \n> > On Tue, Mar 29, 2011 at 7:44 PM, Joshua Juran <jjuran@gmail.com>  \n> > wrote:\n> >> On Mar 29, 2011, at 3:58 AM, Alex Riesen wrote:\n> >>\n> >>> On Tue, Mar 29, 2011 at 12:10, Lynn Lin <lynn.xin.lin@gmail.com>  \n> >>> wrote:\n> >>>\n> >>>> only have two commits\n> >>>\n> >>> Than yes, \"git reset HEAD^; git commit --amend\" seems the best  \n> >>> solution.\n> >>\n> >> Actually, that should be:  `git reset --soft HEAD^; git commit -- \n> >> amend`.\n> >\n> > \"git rebase --root\" does not seem a bad idea though. I need to amend\n> > initial commit a few times and end up using \"git reset\" without\n> > --soft.\n> \n> Or perhaps have `git commit --amend` issue a warning if doesn't  \n> actually amend anything. ............................................\n\nI like this idea. It's been in my notes for a while, but seems like it\nhas a lot of potential to make existing scripts noisy for no reason.\nI do agree with the change, however.\n\nThe only constructive thing I'd add, as it's sitting in my notes right\nnext to \"Warn if \"git commit --amend\" introduces no changes\":\n - Add \"git commit --reword\", like --amend, but without the above\n   warning\n\nThis would fit in with the existing names from \"git rebase -i\".\n--fixup (for \"like --amend but do not ask for a message\") seems like a\nsensible addition to those to, also following the lead of rebase -i, but\n--fixup=<commit> already means something different (though related), so\nit is probably a bad idea to overload --fixup with no =<commit>.\n\n> ........................ Sometimes you just want to change the commit  \n> message, so you wouldn't want a warning in that case.  But other times  \n> you're adding changes and updating the commit message at the same  \n> time, so you'd want a warning if you forgot to git-add or use --soft.   \n> A new --fix option to commit could work like --amend, but fail with an  \n> error if no changes are staged.  Another option is for --amend to list  \n> the staged changes in the edit buffer, or a warning when nothing has  \n> changed.\n> \n> Josh\n> \n> \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":"164604","messageId":"7v1v1psrvr.fsf@alter.siamese.dyndns.org","threadId":"26901","inReplyTo":"AANLkTinjbXzdfkxVRPPSXJj6Z0mMrikzdi2V8N5YAGR-@mail.gmail.com","subject":"Re: how to squash two commits into only one","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-29T18:28:40Z","receivedAt":"2011-03-29T18:28:40Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n>> Actually, that should be: `git reset --soft HEAD^; git commit --amend`.\n>\n> \"git rebase --root\" does not seem a bad idea though.\n\nThe lack of this did't annoy me enough (one woudln't have to deal with\nroot commits too often) so I wouldn't bother implementing it myself, but\n\"git rebase --root\" especially with \"-i\" would be a nice addition.\n\ni.e. well written and explained patches welcome.\n"},{"id":"164713","messageId":"4D9382ED.4090806@dirk.my1.cc","threadId":"26901","inReplyTo":"7v1v1psrvr.fsf@alter.siamese.dyndns.org","subject":"Re: how to squash two commits into only one","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2011-03-30T19:22:21Z","receivedAt":"2011-03-30T19:22:21Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Am 29.03.2011 20:28 schrieb Junio C Hamano:\n> Nguyen Thai Ngoc Duy<pclouds@gmail.com>  writes:\n>\n>>> Actually, that should be: `git reset --soft HEAD^; git commit --amend`.\n>>\n>> \"git rebase --root\" does not seem a bad idea though.\n>\n> The lack of this did't annoy me enough (one woudln't have to deal with\n> root commits too often) so I wouldn't bother implementing it myself, but\n> \"git rebase --root\" especially with \"-i\" would be a nice addition.\n>\n> i.e. well written and explained patches welcome.\n\nLynn, this won't help you right now, but perhaps in the future:\nWhen I create a new repo, the first thing I do is creating an\nempty commit, like so:\n\ngit init my_repo\ncd my_repo\ngit commit --allow-empty -m \"Initial commit (empty)\"\n\nThis creates an empty root commit which is helpful not only\nin your case.\n\nAnother way to solve your problem would be to prepend that empty\nroot commit to your repo afterwards. It's a bit weird, but it\nworks -- at least if you don't have branches (except for\n\"master\").\n\ngit checkout --orphan new_master  (1)\ngit rm -rf .                      (2)\ngit commit --allow-empty -m \"Initial commit (empty)\" (3)\ngit rebase new_master master      (4)\ngit branch -d new_master          (5)\n\n(1) creates a new branch 'new_master' which is totally independent\n     of any other branch in the repo, thus the option's name. But it\n     silently does a \"git add .\", i.e. it stages all files that were\n     checked out before issuing the command. See 'checkout' docs\n     for details.\n(2) removes all the files staged in (1), so that you have a new\n     starting point which is really clean.\n(3) creates the empty root commit on 'new_master'\n(4) replays all changes of 'master' to 'new_master'. 'new_master'\n     then has three commits: the root commit and the two commits from\n     'master'\n(5) removes the 'new_master' which is no longer needed.\n\nAnd NOW you can do your 'rebase -i <root_commit>' to squash your\nactual commits.\n\nIf you have more than one branch you would have to repeat step (4) with\nthe other branches.\n\nHTH,\nDirk\n"}]}