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 6389187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:22:21+00:00 2026-05-25T03:22:21+00:00

I don’t think this is possible, but thought someone might have a nifty idea

  • 0

I don’t think this is possible, but thought someone might have a nifty idea of how to accomplish this:

I have a project that I checked out that was in existence long before I took it over. I have about a dozen changes in various files that I never want checked in (they’re all config changes).

Is there any way to commit this set of changes and then never actually push that one commit? I know it sounds odd 🙂

clarification:

I want these changes to stay in my working directory, I need them for the app to function locally. I want to be able to keep commit other changes around them, even changes in the same file, but never push the config changes to anywhere else…

It’s somewhat like before every push I would want to:

  • cherry pick and stash this one commit
  • rebase the one commit out
  • push
  • re-apply this stash to my codebase
  • 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-05-25T03:22:21+00:00Added an answer on May 25, 2026 at 3:22 am

    This is a similar pattern to maintaining a local patch set to an upstream project you don’t control. The easiest way to handle this is to have an intermediate branch that all changes get merged through, like this:

    ___________________________ master
    \__________________________ config-changes
         \_____________________ daily-work
    

    master contains everything that is to be shared. The only things committed in config-changes are changes you want to be able to revert easily when they are shared. daily-work is the branch you do all your work in. To set it up, do:

    # (no local config changes should be in master at this point)
    git checkout -b config-changes master
    # Make your config-related changes that you don't want to share
    git commit -am "Made local config changes"
    git checkout -b daily-work
    # Work and commit like normal
    

    When you’re ready to share your changes, do:

    git rebase --onto master config-changes daily-work
    git checkout master
    git merge daily-work
    

    That will revert all the changes made in config-changes, but otherwise make it look like you branched directly from master. Note that after you do this rebase, if you want to continue to work in daily-work, you need to rebase it back onto config-changes, but it’s really better to create a new branch for each change.

    When you need to pull down new changes from master, do:

    git checkout master
    git pull
    git checkout config-changes
    git merge master
    

    The merge reapplies your local config changes onto the latest master. You’re then free to create a new daily-work branch, or merge config-changes into the old one, as appropriate. Basically, you never merge directly from master into daily-work. You always go through config-changes first.

    It seems like a lot of work at first, but once you do it once or twice you’ll see it’s a lot easier than maintaining the changes manually.

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

Sidebar

Related Questions

Don't know if this is possible, but I have some code like this: val
Don't think my virtualhost is working correctly. This is what I have inside of
This could be a duplicate question, but I have no idea what search terms
Don't know why but I can't find a solution to this. I have 3
DON'T ASK WHY but... I have a regex that needs to be case insensitive
don't know better title for this, but here's my code. I have class user
Don't ask me how but I'm in a situation where I have DCPs published
I don't know why, but this code worked for me a month ago... maybe
Don't ask why but I have the requirement to draw a border around certain
Don't think that I'm mad, I understand how php works! That being said. I

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.