Re: two branches: keep one difference but merge others forth and back
- From
- Tor Arntsen <tor@spacetec.no>
- Date
- Nov 30, 2011, 12:37 UTC
- Message-ID
- <CABNEGjwJTBEvTcYPS1+DfJGuASGnaQq3wM=zYshvYXdhmnUEUg@mail.gmail.com>
- In-Reply-To
- <jats5v$r7c$1@dough.gmane.org>
On Sun, Nov 27, 2011 at 18:31, Gelonida N <gelonida@gmail.com> wrote:
Show 15 quoted lines
> Hi, > > > Is this possible. > > > I'd like to have two branches. > > If possible I would be able to merge forth and back between both of them. > > However I would like, that certain differences will be kept between both > branches. > > Is there any way to tell git to permanently ignoring certain commits > from merging?
Instead of merging, you could use rebasing. So you have one development branch where you do all the changes, and then another branch where the only commit there is that special difference (as in your /usr/bin/bash example). From then on you only develop/maintain the original branch, and then you rebase the 'special' branch on top of the development branch. Then you get all the updates, plus your special change applied on top each time. Likewise, if you have two variants (say, one /bin/bash, another /usr/bin/bash, and then one with /usr/local/bin/bash) then create two branches and rebase them on top of the third branch (the development branch) every time you wish to deploy new updates.
-Tor