Dear all, Sorry for my lame question here. I want to pull out the version 3 source from github. Therefore I use the clone command as such: git clone git:// github.com/rails/rails.git I then get in to the working directory and typed: git branch 3-0-unstable But it turns out that I can not do that because there''s only master branch. Does anyone know what am I missing here? Thanks in advance. -- Join Scrum8.com. http://scrum8.com/jpartogi/ http://twitter.com/scrum8 -- Join Scrum8.com. http://scrum8.com/jpartogi/ http://twitter.com/scrum8 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
master is the version 3 branch now. On May 21, 2009, at 11:56 PM, Joshua Partogi wrote:> I then get in to the working directory and typed: git branch 3-0- > unstable > > But it turns out that I can not do that because there''s only master > branch. > > Does anyone know what am I missing here?
Mike has steered you on the right track for this time, more generally though - remote branches aren''t available directly as local branches when using git. I faced this myself, and worked it out independently so someone please correct me if I''m giving Joshua a bum steer here. You can view the remote branches in a cloned repo by passing the -r option to git branch: git branch -r You can then checkout one of the remote branches to a local branch with something like this (remember, as per Mike''s advice, this is not what you want in this particular case): git checkout -b 3-0-unstable origin/3-0-unstable And then proceed as usual. On 22/05/2009, at 2:56 PM, Joshua Partogi wrote:> > Dear all, > > Sorry for my lame question here. I want to pull out the version 3 > source from github. Therefore I use the clone command as such: git > clone git://github.com/rails/rails.git > > I then get in to the working directory and typed: git branch 3-0- > unstable > > But it turns out that I can not do that because there''s only master > branch. > > Does anyone know what am I missing here? > > Thanks in advance. > > -- > Join Scrum8.com. > > http://scrum8.com/jpartogi/ > http://twitter.com/scrum8 > > > > -- > Join Scrum8.com. > > http://scrum8.com/jpartogi/ > http://twitter.com/scrum8 > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Just as a little hint; if you have write access to the remote branch, and want it to work the same way "master" does with "origin/master", you can add the --track (or just -t) option to git branch. That will make the local branch "track" the remote, i.e. pushing and pulling from that branch is implicitly done with the tracked remote branch, without needing specification; e.g. git checkout -tb foo some-remote/bar git commit -am "Implement awesomeness" git push # pushes to some-remote/bar Best regards, Daniel Schierbeck On Sat, May 23, 2009 at 1:29 AM, Jason King <smathy.werp@gmail.com> wrote:> Mike has steered you on the right track for this time, more generally though > - remote branches aren''t available directly as local branches when using > git. I faced this myself, and worked it out independently so someone please > correct me if I''m giving Joshua a bum steer here. > You can view the remote branches in a cloned repo by passing the -r option > to git branch: > > git branch -r > > You can then checkout one of the remote branches to a local branch with > something like this (remember, as per Mike''s advice, this is not what you > want in this particular case): > > git checkout -b 3-0-unstable origin/3-0-unstable > > And then proceed as usual. > On 22/05/2009, at 2:56 PM, Joshua Partogi wrote: > > Dear all, > > Sorry for my lame question here. I want to pull out the version 3 source > from github. Therefore I use the clone command as such: git clone > git://github.com/rails/rails.git > > I then get in to the working directory and typed: git branch 3-0-unstable > > But it turns out that I can not do that because there''s only master branch. > > Does anyone know what am I missing here? > > Thanks in advance. > > -- > Join Scrum8.com. > > http://scrum8.com/jpartogi/ > http://twitter.com/scrum8 > > > > -- > Join Scrum8.com. > > http://scrum8.com/jpartogi/ > http://twitter.com/scrum8 > > > > > > > >
Even if you cannot push it is worth tracking so that pull works 2009/5/23 Daniel Schierbeck <daniel.schierbeck@gmail.com>> > Just as a little hint; if you have write access to the remote branch, > and want it to work the same way "master" does with "origin/master", > you can add the --track (or just -t) option to git branch. That will > make the local branch "track" the remote, i.e. pushing and pulling > from that branch is implicitly done with the tracked remote branch, > without needing specification; e.g. > > git checkout -tb foo some-remote/bar > git commit -am "Implement awesomeness" > git push # pushes to some-remote/bar > > > Best regards, > Daniel Schierbeck > > On Sat, May 23, 2009 at 1:29 AM, Jason King <smathy.werp@gmail.com> wrote: > > Mike has steered you on the right track for this time, more generally > though > > - remote branches aren''t available directly as local branches when using > > git. I faced this myself, and worked it out independently so someone > please > > correct me if I''m giving Joshua a bum steer here. > > You can view the remote branches in a cloned repo by passing the -r > option > > to git branch: > > > > git branch -r > > > > You can then checkout one of the remote branches to a local branch with > > something like this (remember, as per Mike''s advice, this is not what you > > want in this particular case): > > > > git checkout -b 3-0-unstable origin/3-0-unstable > > > > And then proceed as usual. > > On 22/05/2009, at 2:56 PM, Joshua Partogi wrote: > > > > Dear all, > > > > Sorry for my lame question here. I want to pull out the version 3 source > > from github. Therefore I use the clone command as such: git clone > > git://github.com/rails/rails.git > > > > I then get in to the working directory and typed: git branch 3-0-unstable > > > > But it turns out that I can not do that because there''s only master > branch. > > > > Does anyone know what am I missing here? > > > > Thanks in advance. > > > > -- > > Join Scrum8.com. > > > > http://scrum8.com/jpartogi/ > > http://twitter.com/scrum8 > > > > > > > > -- > > Join Scrum8.com. > > > > http://scrum8.com/jpartogi/ > > http://twitter.com/scrum8 > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---