Results 1 to 10 of 13

Thread: Getting Source Code from Git for Local Dev

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2003
    Posts
    3,040

    Default Getting Source Code from Git for Local Dev

    Getting Source Code from Git

    Once you have Setup Local Web Site, you need to clone git repo.

    Finding Git Repo URL

    You can find Git Repo url at top of Gitlab.



    Cloning Git Repo (Downloading Source Code to your Computer)

    First you need to delete the folder we created in previous post.

    Code:
    rm -rf ~/www/imagehostnow.com
    Be careful with rm -rf as it delete directory with warning and no recycle bin. You may use File Manager and go to folder

    Code:
    /home/YOUR_USER_NAME/www/
    and delete or rename folder "imagehostnow.com".

    Now we are ready to clone the web site, run following commands in terminal.

    Code:
    cd ~/www
    git clone ssh://[email protected]:10022/buyscripts/imagehost.git imagehostnow.com
    You get something like

    Code:
    # git clone ssh://[email protected]:10022/buyscripts/imagehost.git imagehostnow.com
    Initialized empty Git repository in /home/boby/www/imagehostnow.com/.git/
    remote: Counting objects: 194, done.
    remote: Compressing objects: 100% (167/167), done.
    remote: Total 194 (delta 57), reused 0 (delta 0)
    Receiving objects: 100% (194/194), 311.04 KiB, done.
    Resolving deltas: 100% (57/57), done.
    #
    In git clone command, we used web site name as last param. Git clone will create a folder with that name and clone git repo into that folder.

    Now visit web site, you will see the web site.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  2. #2
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    I have done everything.




    I got following page:


  3. #3
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Good, now in terminal, run

    Code:
    cd ~/www/imagehostnow.com
    composer install
    That will install all dependency packages required by the project.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  4. #4
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    error result:.

    Last edited by sherlyk; 01-09-2015 at 05:42 AM.

  5. #5
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    First time i got error message while running the command:

    Code:
    cd ~/www/imagehostnow.com
    composer install
    The error message was like




    Then retried the command again this time it worked fine without doing anything.

    I got following result :


    Last edited by sherlyk; 01-09-2015 at 06:36 AM.

  6. #6
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Good. Always read error messages. It said

    Failed to download..
    That means composer can't download some files from github.com

    That means one or more of the following

    1. problem with your internet connection
    2. github down
    3. some thing wrong with connection from your pc and github, many thing can happen in between.

    Now, go to web site

    Code:
    http://imagehostnow.dev
    See if there any change in error you got before.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •