Re: Question about "git pull --rebase"
- From
- Francis Moreau <francis.moro@gmail.com>
- Date
- Nov 16, 2009, 12:17 UTC
- Message-ID
- <38b2ab8a0911160417w6b9cc943h5e87d4e22d0dea2b@mail.gmail.com>
- In-Reply-To
- <4AFF3D4D.7000308@gmail.com>
On Sun, Nov 15, 2009 at 12:29 AM, Johan 't Hart <johanthart@gmail.com> wrote:
Show 9 quoted lines
> This does not update any remote tracking branches, but it will rebase your > foo branch on the remote master branch (which is what you want) > It could also be done with: > > git pull --rebase origin master:origin/master > > This will also update your remote tracking branch refs/remotes/origin/master > to match the master branch on the remote repo. Your foo branch will then be > rebased onto it.
BTW, this seems to be not exact.
$ git pull --rebase origin master:origin/master
fetches the 'master' branch on the remote repo, then creates a new branch 'origin/master', which is updated with the fetched branch.
To update the remote tracking branch refs/remotes/origin/master, I need to issue:
$ git pull --rebase origin master:remotes/origin/master
BTW2, it looks like if the <dst> local ref doesn't exist the it will be created. This something that appears very lately in the man page (actually I can see the information only in the last example). This could be part of the <refspec> defintion.
Thanks
-- Francis