Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:04:45+00:00 2026-06-01T16:04:45+00:00

I have a problem with GitHub. I use the remote repository on GitHub to

  • 0

I have a problem with GitHub.

I use the remote repository on GitHub to download a copy into a server to make an installation of a software, but each server needs to make some changes to a file named /www/inc/config.inc.php a other folders like www/images/ because each installation is personalized.

The problem comes when I call the command “git pull” to synchronize the different server installations with GitHub to get the new changes or versions because the file www/inc/config.inc.php changes it’s content to the original one, or the one that is located on GitHub.
I’d like to say GitHub to not synchronize the www/inc/config.inc.php file and the /www/images folder on each server that I ran originally the git clone command to make a new installation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:04:46+00:00Added an answer on June 1, 2026 at 4:04 pm

    I first want to restate your problem to ensure that I understand correctly.

    You have servers that need to have installations performed or updated if they exist. You have the installation files on github.

    For new installations, you clone from github and then modify the /www/inc/config.inc.php file and /www/images folder.

    When you perform updates, you push those updates to github, and then you want to pull those updates from github to your various servers, but don’t want to merge or overwrite the local changes.

    Please comment if I have the scenario incorrect.

    Assuming the above is correct, here is an approach to accomplishing this:

    When you first clone the repo to the local server, create a branch before making your local changes. Always keep the local repo on the branch you created.

    #clone the repo
    git clone git://github.com/you/yourproject.git
    
    #create and checkout a local working branch
    git checkout -b workingBranch
    
    #make your changes to configs and other directories freely
    ...
    #when you're done, add and commit those changes
    git add .
    git commit
    

    When you have an update you want to pull to the local machine

    #checkout the master branch
    git checkout master
    
    #pull to get the latest code
    git pull origin master
    
    #checkout the workingBranch again
    git checkout workingBranch
    
    #rebase to get the new changes on that branch
    git rebase master
    

    This will temporarily roll back your changes that you made on your branch, get the latest commits from the master branch, and then “replay” your commits on top of the new changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a gitosis server at work, and I also use github for personal
I want to use PHP writing git hooks but have some problem. I use
I have a problem in running a new project which I downloaded from github.
I'm trying to use GitHub for the first time, but after many issues trying
I like javascript, but I have problem with learning it :) I mean, i
I have a problem with Capistrano deploying to a server with RVM and gemsets
I have been trying to learn to use github, it has been fine until
I'm trying to set pu my git, but I have a little problem with
I have looked everywhere but have not found a problem similar to this. I
I have a problem using devise with an AJAX login. I'm using the :remote

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.