# excluding files from a merge

4 messages from 2009-03-15 to 2009-03-16. Participants: Daniel Jacobs, Jay Soffian, Nanako Shiraishi.
Thread: https://gitlist.dev/t/18313

## Daniel Jacobs, 2009-03-15 01:23

Subject: excluding files from a merge
Message-ID: <loom.20090315T011519-497@post.gmane.org>
URL: https://gitlist.dev/e/loom.20090315T011519-497%40post.gmane.org

```
Our project has two main branches set up, one called 'development, and 
another called 'production'.

Each branch has a file in it called database.yml, (this is a rails project)...
 The development branch and the 
production branch are supposed to have different versions of this file. 
(and not only this file, but other 
config sorts of files as well, but this is a good example).

At the same time, when development is ready for deployment, we will do
git checkout production
git merge development

I would like it if every file was merged, except for files that were explictly 
excluded from a merge between these two branches.  Is there a good way to do
this?

-Daniel

```

## Jay Soffian, 2009-03-15 12:47

Subject: Re: excluding files from a merge
Message-ID: <76718490903150547o1c791d35r5d71000b481f443b@mail.gmail.com>
URL: https://gitlist.dev/e/76718490903150547o1c791d35r5d71000b481f443b%40mail.gmail.com
In-Reply-To: <loom.20090315T011519-497@post.gmane.org>

```
On Sat, Mar 14, 2009 at 9:23 PM, Daniel Jacobs <djacobs7@gmail.com> wrote:
> I would like it if every file was merged, except for files that were explictly
> excluded from a merge between these two branches.  Is there a good way to do
> this?

Please see http://thread.gmane.org/gmane.comp.version-control.git/110488
(Is there a way to exclude user-specified files or directories from
participating in merges?)

I believe it is the same use case, and Junio provided a very detailed reply.

HTH,

j.

```

## Nanako Shiraishi, 2009-03-15 22:14

Subject: Re: excluding files from a merge
Message-ID: <20090316071440.6117@nanako3.lavabit.com>
URL: https://gitlist.dev/e/20090316071440.6117%40nanako3.lavabit.com
In-Reply-To: <76718490903150547o1c791d35r5d71000b481f443b@mail.gmail.com>

```
Quoting Jay Soffian <jaysoffian@gmail.com>:

> On Sat, Mar 14, 2009 at 9:23 PM, Daniel Jacobs <djacobs7@gmail.com> wrote:
>> I would like it if every file was merged, except for files that were explictly
>> excluded from a merge between these two branches.  Is there a good way to do
>> this?
>
> Please see http://thread.gmane.org/gmane.comp.version-control.git/110488
> (Is there a way to exclude user-specified files or directories from
> participating in merges?)
>
> I believe it is the same use case, and Junio provided a very detailed reply.

Would it help to have the final summary by Sitaram Chamarty

    http://article.gmane.org/gmane.comp.version-control.git/110697

somewhere under Documentation/howto?


-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

```

## Jay Soffian, 2009-03-16 01:45

Subject: Re: excluding files from a merge
Message-ID: <76718490903151845i27984ccaqbfb289eff69f7dc6@mail.gmail.com>
URL: https://gitlist.dev/e/76718490903151845i27984ccaqbfb289eff69f7dc6%40mail.gmail.com
In-Reply-To: <20090316071440.6117@nanako3.lavabit.com>

```
On Sun, Mar 15, 2009 at 6:14 PM, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> Would it help to have the final summary by Sitaram Chamarty
>
>    http://article.gmane.org/gmane.comp.version-control.git/110697
>
> somewhere under Documentation/howto?

I don't think it would hurt. A good explanation of remote tracking
branches, local branches, and what --track means might not hurt
either. :-)

j.

```
