How do I retrieve a ruby app that I've pushed to github? I've been
pushing as I've been developing on my pc, and now I want to get the app
on my laptop, so I can develop on my laptop.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Chirag Singhal at Sep 21, 2011 at 5:58 am
    First you have to setup your laptop for git usage similar to what you had
    done for your PC.
    1. Install Git
    2. Generate SSH keys
    3. Add your laptop's public key to your github account (you can add as many
    keys as you want, so do not modify your PC's key, just add a new one)

    Then go to your repo page on github, copy the clone url shown there, and use
    git clone <clone url>
    to get your ruby app on your laptop.
    From there on, you can continue working same way as you did on your PC.
    Chirag
    http://sumeruonrails.com


    On Wed, Sep 21, 2011 at 11:18 AM, 7stud -- wrote:

    How do I retrieve a ruby app that I've pushed to github? I've been
    pushing as I've been developing on my pc, and now I want to get the app
    on my laptop, so I can develop on my laptop.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • 7stud -- at Sep 23, 2011 at 4:51 am

    Chirag Singhal wrote in post #1023053:
    First you have to setup your laptop for git usage similar to what you
    had
    done for your PC.
    1. Install Git
    2. Generate SSH keys
    3. Add your laptop's public key to your github account (you can add as
    many
    keys as you want, so do not modify your PC's key, just add a new one)

    Then go to your repo page on github, copy the clone url shown there, and
    use
    git clone <clone url>
    to get your ruby app on your laptop.

    From there on, you can continue working same way as you did on your PC.

    Chirag
    http://sumeruonrails.com
    There is nothing at github that says "clone url". There is a url
    displayed when you go to a repo. So on my laptop, I went to the
    directory I want my app to be in, rails_projects, and then I issued the
    command you showed me. Then I cd'ed into the newly created app
    directory, and I get this:

    $ git branch
    *master

    However, I have another branch on github called 'updating users', and I
    can't figure out how to download the other branch.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Chirag Singhal at Sep 23, 2011 at 5:03 am
    You have to create new branch locally and pull code from your git branch
    into that one.
    So something like this on your laptop:
    Open up terminal and change directory to where your app is checked out.
    Create a new local branch:
    git checkout -b updating_users

    Pull code in that branch from your github repo branch:
    git pull origin updating_users

    Alternatively you can also use this command:
    git checkout -b updating_users origin/updating_users


    Chirag
    http://sumeruonrails.com


    On Fri, Sep 23, 2011 at 10:21 AM, 7stud -- wrote:

    Chirag Singhal wrote in post #1023053:
    First you have to setup your laptop for git usage similar to what you
    had
    done for your PC.
    1. Install Git
    2. Generate SSH keys
    3. Add your laptop's public key to your github account (you can add as
    many
    keys as you want, so do not modify your PC's key, just add a new one)

    Then go to your repo page on github, copy the clone url shown there, and
    use
    git clone <clone url>
    to get your ruby app on your laptop.

    From there on, you can continue working same way as you did on your PC.

    Chirag
    http://sumeruonrails.com
    There is nothing at github that says "clone url". There is a url
    displayed when you go to a repo. So on my laptop, I went to the
    directory I want my app to be in, rails_projects, and then I issued the
    command you showed me. Then I cd'ed into the newly created app
    directory, and I get this:

    $ git branch
    *master

    However, I have another branch on github called 'updating users', and I
    can't figure out how to download the other branch.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Sep 23, 2011 at 7:32 pm

    On 23 September 2011 06:02, Chirag Singhal wrote:
    You have to create new branch locally and pull code from your git branch
    into that one.
    So something like this on your laptop:
    Open up terminal and change directory to where your app is checked out.
    Create a new local branch:
    git checkout -b updating_users
    Pull code in that branch from your github repo branch:
    git pull origin updating_users
    Alternatively you can also use this command:
    git checkout -b updating_users origin/updating_users
    Chirag: Are you sure about this. I thought that when you cloned a
    repository it would come with all its branches, and all that the OP
    should need to do is
    git checkout <branch_name>

    OP: if you have gitk installed (if you have not then do so, and also
    git-gui) then try
    gitk --all
    and it should show you all the history and branches in the cloned repository

    Colin

    Colin
    Chirag
    http://sumeruonrails.com

    On Fri, Sep 23, 2011 at 10:21 AM, 7stud -- wrote:

    Chirag Singhal wrote in post #1023053:
    First you have to setup your laptop for git usage similar to what you
    had
    done for your PC.
    1. Install Git
    2. Generate SSH keys
    3. Add your laptop's public key to your github account (you can add as
    many
    keys as you want, so do not modify your PC's key, just add a new one)

    Then go to your repo page on github, copy the clone url shown there, and
    use
    git clone <clone url>
    to get your ruby app on your laptop.

    From there on, you can continue working same way as you did on your PC.

    Chirag
    http://sumeruonrails.com
    There is nothing at github that says "clone url".  There is a url
    displayed when you go to a repo.  So on my laptop, I went to the
    directory I want my app to be in, rails_projects, and then I issued the
    command you showed me.  Then I cd'ed into the newly created app
    directory, and I get this:

    $ git branch
    *master

    However, I have another branch on github called 'updating users', and  I
    can't figure out how to download the other branch.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.


    --
    gplus.to/clanlaw

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Chirag Singhal at Sep 24, 2011 at 3:51 am

    On Fri, Sep 23, 2011 at 1:38 PM, Colin Law wrote:
    On 23 September 2011 06:02, Chirag Singhal wrote:
    You have to create new branch locally and pull code from your git branch
    into that one.
    So something like this on your laptop:
    Open up terminal and change directory to where your app is checked out.
    Create a new local branch:
    git checkout -b updating_users
    Pull code in that branch from your github repo branch:
    git pull origin updating_users
    Alternatively you can also use this command:
    git checkout -b updating_users origin/updating_users
    Chirag: Are you sure about this. I thought that when you cloned a
    repository it would come with all its branches, and all that the OP
    should need to do is
    git checkout <branch_name>

    Colin: I am not sure if there is another way to get all branches. This is
    how I have been fetching other branches for a while now.
    I looked up github guides to double check and it seems to confirm the
    behavior - http://help.github.com/remotes/ scroll down to "clone"
    documentation.

    Chirag
    http://sumeruonrails.com

    OP: if you have gitk installed (if you have not then do so, and also
    git-gui) then try
    gitk --all
    and it should show you all the history and branches in the cloned
    repository

    Colin

    Colin
    Chirag
    http://sumeruonrails.com

    On Fri, Sep 23, 2011 at 10:21 AM, 7stud -- wrote:

    Chirag Singhal wrote in post #1023053:
    First you have to setup your laptop for git usage similar to what you
    had
    done for your PC.
    1. Install Git
    2. Generate SSH keys
    3. Add your laptop's public key to your github account (you can add as
    many
    keys as you want, so do not modify your PC's key, just add a new one)

    Then go to your repo page on github, copy the clone url shown there,
    and
    use
    git clone <clone url>
    to get your ruby app on your laptop.

    From there on, you can continue working same way as you did on your
    PC.
    There is nothing at github that says "clone url". There is a url
    displayed when you go to a repo. So on my laptop, I went to the
    directory I want my app to be in, rails_projects, and then I issued the
    command you showed me. Then I cd'ed into the newly created app
    directory, and I get this:

    $ git branch
    *master

    However, I have another branch on github called 'updating users', and I
    can't figure out how to download the other branch.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google
    Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.


    --
    gplus.to/clanlaw

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Peter Vandenabeele at Sep 24, 2011 at 9:08 am
    On Sat, Sep 24, 2011 at 5:51 AM, Chirag Singhal wrote:
    On Fri, Sep 23, 2011 at 1:38 PM, Colin Law wrote:

    On 23 September 2011 06:02, Chirag Singhal <chirag.singhal@gmail.com>
    wrote:
    You have to create new branch locally and pull code from your git branch
    into that one.
    So something like this on your laptop:
    Open up terminal and change directory to where your app is checked out.
    Create a new local branch:
    git checkout -b updating_users
    Pull code in that branch from your github repo branch:
    git pull origin updating_users
    Alternatively you can also use this command:
    git checkout -b updating_users origin/updating_users
    Chirag: Are you sure about this. I thought that when you cloned a
    repository it would come with all its branches, and all that the OP
    should need to do is
    git checkout <branch_name>

    Colin: I am not sure if there is another way to get all branches. This is
    how I have been fetching other branches for a while now.
    I looked up github guides to double check and it seems to confirm the
    behavior - http://help.github.com/remotes/ scroll down to "clone"
    documentation.

    Chirag
    http://sumeruonrails.com

    OP: if you have gitk installed (if you have not then do so, and also
    git-gui) then try
    gitk --all
    and it should show you all the history and branches in the cloned
    repository
    I think the missing link here is the command

    $ git branch -r

    This will show all the remote branches. From there you can then check them
    out
    locally. The data is in your local repo after the clone (so you can do this
    off-line),
    but only a default branch is checked out with git clone. Whis is the default
    branch
    can be set as "Default branch" on the github admin page for a project.

    peterv@ASUS:~/b/github/twitter/bootstrap$ git branch
    * master
    peterv@ASUS:~/b/github/twitter/bootstrap$ git branch -r
    origin/1.3-wip
    origin/1.4-wip
    origin/HEAD -> origin/master
    origin/gh-pages
    origin/master
    peterv@ASUS:~/b/github/twitter/bootstrap$ # disconnected Ethernet
    peterv@ASUS:~/b/github/twitter/bootstrap$ ping github.com
    ping: unknown host github.com
    peterv@ASUS:~/b/github/twitter/bootstrap$ git checkout -b 1.4-wip
    origin/1.4-wip
    Branch 1.4-wip set up to track remote branch 1.4-wip from origin.
    Switched to a new branch '1.4-wip'
    peterv@ASUS:~/b/github/twitter/bootstrap$ ls -l | head -4
    total 128
    -rw-r--r-- 1 peterv peterv 52167 2011-09-24 11:00 bootstrap.css
    -rw-r--r-- 1 peterv peterv 43541 2011-09-24 11:00 bootstrap.min.css
    drwxr-xr-x 3 peterv peterv 4096 2011-09-24 11:00 docs

    HTH,

    Peter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • 7stud -- at Sep 21, 2011 at 6:42 pm
    Thanks!

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 21, '11 at 5:48a
activeSep 24, '11 at 9:08a
posts8
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase