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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:07:31+00:00 2026-06-16T16:07:31+00:00

In a project of ours we have, as usual, a master branch. Based on

  • 0

In a project of ours we have, as usual, a master branch. Based on that is the deployment branch, where the settings are modified. Also based on that is a mirror branch that runs the mirror of the deployment. The master branch ought not contain any config changing patches.

Small features and fixes are developed in the mirror branch. So after adding a feature, it looks like this:

master:      history ┐
deployment:          ├─ deployment-config
mirror:              └─ mirror-config ── feature

Now to move the feature back into master, I first have to reorder the patches in the mirror branch:

master:      history ┐
deployment:          ├─ deployment-config
mirror:              └─ feature ── mirror-config

Now I can fast-forward-merge that into master

master:      history ┬─ feature ┐
mirror:              │          └─ mirror-config
deployment:          └─ deployment-config

And then merge master into mirror, and rebasing it onto master

master:      history ── feature ┐
mirror:                         ├─ mirror-config
deployment:                     └─ deployment-config

Is there a plugin or tool that would automate that, so that

  • every new commit is automatically applied „below“ the top commit,
  • every merge or cherry-pick is also automatically applied „below“ the top commit,
  • a merge from such a branch pulls from the state „below“ the top commit?
  • 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-16T16:07:32+00:00Added an answer on June 16, 2026 at 4:07 pm

    In general I would recommend to try and get away from that config commit situation. Can’t you just store the config on your deployments? Or use smudge filters, as I explained here: https://stackoverflow.com/a/13616911/758345

    If that’s not an option, let me answer your questions, as there are simpler ways to achieve what you want thanks to the fact that branches in git are so light-weight. None of these are a complete automation, but quite simple and you could definitely write some small scripts for that.

    every new commit is automatically applied „below“ the top commit

    Not quite sure about the situation, but assuming you made changes and want to commit them:

    1. Remember your current branch-head’s SHA
    2. Stash your changes
    3. git reset --hard HEAD^
    4. stash pop
    5. commit
    6. cherry-pick your old branch-head

    every merge or cherry-pick is also automatically applied „below“ the top commit

    same as above: reset --hard, do your work, cherry-pick old branch head

    a merge from such a branch pulls from the state „below“ the top commit?

    This one is very simple: git merge mybranch^


    If you do not want to change your working dir, and the files modified by your “config commit” are not touched by your other operations, you can do this:

    1. Remeber your current branch-head’s SHA
    2. Do a soft reset: git reset HEAD^
    3. Make git ignore your config files via git update-index --assume-unchanged
    4. create your commit
    5. run git update-index --no-assume-unchanged for your config files
    6. commit again – this will recreate your config files.

    If you automate this via script, you can use git to get a list of config files for --assume-unchanged by looking at the config commit. If you do not want to automate this, you can skip step 3 and 5, and just make sure you don’t commit your config files in step 4.

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

Sidebar

Related Questions

My project is ARC enabled (the build settings have Objective-C Reference Counting set to
Project is C#. So I have a bunch of multithreaded code that is designed
Project Structure I have a silverlight project SLProj, that references a silverlight class library
I have a project containing two branches: master and gh-pages. They are essentially two
Project I have to work with uses a lot of tables that can have
Ours is a typical implementation of clearcase UCM : I have 2 UCM projects
My project consists of an app that links to two static libraries. Each of
The project that I am working on (Node.js) implies lots of operations with the
The project currently has a UIviewController called Dashboard that acts as the main view
We have need for a rating system in a project we are working on,

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.