Friday, April 12, 2013

git commands 1

To follow a project on GitHub (for e.g. my DBNotes project) - copy the repository and take updates when needed

1. To copy a repository from github.com -
     we have to 'clone' it
     Suppose we run the below command (observe that 'current directory' is C:\Sites)
     C:\Sites > git clone git@github.com:theAcadian/DBNotes.git

Result of above command will be to create a directory called "DBNotes"

2. To get updates -
     C:\Sites > cd DBNotes
   C:\Sites\DBNotes > git pull git@github.com:theAcadian/DBNotes.git

3. To run the project (these are Rails commands) -
    C:\Sites\DBNotes > bundle install
    C:\Sites\DBNotes > rake db:migrate
    C:\Sites\DBNotes > rails s

 4. Open localhost:3000 in browser.

No comments:

Post a Comment

Followers

Blog Archive