Results 1 to 10 of 34

Thread: Pulling latest software changes from GIT

Hybrid View

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

    Default

    Quote Originally Posted by sherlyk View Post
    I run command:

    Code:
    cd ~/www/imagehostnow.com
    git pull origin master
    Result:

    Code:
    sherly@HOME:~/www/imagehostnow.com$ cd ~/www/imagehostnow.com
    sherly@HOME:~/www/imagehostnow.com$ git pull origin master
    remote: Counting objects: 181, done.
    remote: Compressing objects: 100% (169/169), done.
    remote: Total 181 (delta 109), reused 0 (delta 0)
    Receiving objects: 100% (181/181), 22.68 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (109/109), completed with 18 local objects.
    From ssh://git.buyscripts.in:10022/buyscripts/imagehost
     * branch            master     -> FETCH_HEAD
       1316183..3fe7347  master     -> origin/master
    Updating 1316183..3fe7347
    error: Your local changes to the following files would be overwritten by merge:
        app/config/database.php
    Please, commit your changes or stash them before you can merge.
    Aborting
    sherly@HOME:~/www/imagehostnow.com$

    This git pull did not worked as local files changed.

    git pull only work if your local files are not changed, if you change, make sure you commit.

    For now, since the change is not critical, take git gui, then see the changes, take note of it. Git gui have option to revert changes (check the menu items, you will see it). Revert changes, make sure you can apply those changes back if needed, so if needed make a copy of the file before you revert.


    Now

    Code:
    git status
    Will say everything updated, no files are listed as changed in git gui too.

    Now run, "git pull origin master" it will work.

    Post result.
    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 changed Revert changes in git gui.Then run these commands g0t following result:

    Code:
    git status
    git pull origin master
    Result

    Code:
    sherly@HOME:~/www/imagehostnow.com$ git status
    On branch master
    Your branch is behind 'origin/master' by 34 commits, and can be fast-forwarded.
      (use "git pull" to update your local branch)
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
        modified:   app/storage/.gitignore
        modified:   app/storage/cache/.gitignore
        modified:   app/storage/logs/.gitignore
        modified:   app/storage/meta/.gitignore
        modified:   app/storage/sessions/.gitignore
        modified:   app/storage/views/.gitignore
    
    no changes added to commit (use "git add" and/or "git commit -a")
    sherly@HOME:~/www/imagehostnow.com$ git pull origin master
    From ssh://git.buyscripts.in:10022/buyscripts/imagehost
     * branch            master     -> FETCH_HEAD
    Updating 1316183..8ffcaab
    Fast-forward
     .gitignore                                         |   4 +-
     README/install.txt                                 |   1 +
     app/config/database.php                            |   6 +--
     app/controllers/GalleryController.php              |  15 ++++++
     app/controllers/ImageController.php                |  18 ++-----
     app/controllers/UploadController.php               |  23 ++++----
     .../2015_01_06_090738_create_table_images.php      |   2 +-
     .../2015_01_16_062107_add_uid_in_images.php        |  30 +++++++++++
     ...7_032543_alter_table_images_folder_nullable.php |  28 ++++++++++
     ...7_085023_alter_table_images_remove_seo_name.php |  30 +++++++++++
     ..._01_17_094457_alter_table_images_remove_uid.php |  30 +++++++++++
     app/models/Image.php                               |  27 +++++++++-
     app/models/Thumb.php                               |  58 +++++++++++++++++++++
     app/routes.php                                     |   5 +-
     app/views/admin/image/view.blade.php               |   4 +-
     .../gallery.blade.php => gallery/index.blade.php}  |   2 +-
     app/views/home/index.blade.php                     |   2 +-
     app/views/image/index.blade.php                    |  13 +----
     app/views/layouts/master.blade.php                 |   2 +-
     app/views/upload/success.blade.php                 |  29 -----------
     app/views/user/images.blade.php                    |   4 +-
     public/css/style.css                               |   3 ++
     public/images/logo.png                             | Bin 0 -> 2337 bytes
     23 files changed, 252 insertions(+), 84 deletions(-)
     create mode 100644 README/install.txt
     create mode 100644 app/controllers/GalleryController.php
     create mode 100644 app/database/migrations/2015_01_16_062107_add_uid_in_images.php
     create mode 100644 app/database/migrations/2015_01_17_032543_alter_table_images_folder_nullable.php
     create mode 100644 app/database/migrations/2015_01_17_085023_alter_table_images_remove_seo_name.php
     create mode 100644 app/database/migrations/2015_01_17_094457_alter_table_images_remove_uid.php
     create mode 100644 app/models/Thumb.php
     rename app/views/{image/gallery.blade.php => gallery/index.blade.php} (91%)
     delete mode 100644 app/views/upload/success.blade.php
     create mode 100644 public/images/logo.png
    sherly@HOME:~/www/imagehostnow.com$

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

    Default

    Good.

    Now you see many files are pulled down to your computer.

    Some of the files are in folder

    Code:
    app/database/migrations
    That means, there is change in database structure. Some new tables created/deleted or even changed. Every time, database migration files changed, you need to run "php artisan migrate"

    Code:
    php artisan migrate
    Run it and post result.
    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

    Run the command.

    Code:
    php artisan migrate
    Find below the result.

    Code:
    sherly@HOME:~/www/imagehostnow.com$ php artisan migrate
    **************************************
    *     Application In Production!     *
    **************************************
    
    Do you really wish to run this command? yes
    
    
                                                                                   
      [PDOException]                                                               
      SQLSTATE[28000] [1045] Access denied for user 'imagehostnow'@'localhost' (u  
      sing password: YES)                                                          
                                                                                   
    
    
    migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]
    
    
    sherly@HOME:~/www/imagehostnow.com$

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

    Default

    That is some error.

    Can you read the error message and try to find out what it is saying ? What may be the reason for that error ?
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

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

    Default

    Error: SQLSTATE[28000] [1045] Access denied for user 'imagehostnow'@'localhost' (using password: YES)
    Reason:I changed Revert changes on app/config/database.php file.

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

    Default

    Good.

    Now, repeat the steps we done. This need to be done everyday whenever new commit is made to master branch in gitlab, so your source code is always uptodate.

    Then verify last commit is same as in gitlab.
    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
  •