# Per-file force update

3 messages from 2007-01-25 to 2007-01-26. Participants: Troy Telford, Shawn O. Pearce, Jakub Narebski.
Thread: https://gitlist.dev/t/6526

## Troy Telford, 2007-01-25 17:17

Subject: Per-file force update
Message-ID: <op.tmpzmzvtzidtg1@rygel.lnxi.com>
URL: https://gitlist.dev/e/op.tmpzmzvtzidtg1%40rygel.lnxi.com

```
I've got a file that (due to some inner workings) changes whenever it's  
built.

This causes a problem with git, causing merge conflicts.

Is there a way I can configure git to /always/ do the equivalent of 'git  
pull -f', but only for that one file?

Thanks,
-- 
Troy Telford

```

## Shawn O. Pearce, 2007-01-25 17:22

Subject: Re: Per-file force update
Message-ID: <20070125172226.GB13089@spearce.org>
URL: https://gitlist.dev/e/20070125172226.GB13089%40spearce.org
In-Reply-To: <op.tmpzmzvtzidtg1@rygel.lnxi.com>

```
Troy Telford <ttelford.groups@gmail.com> wrote:
> I've got a file that (due to some inner workings) changes whenever it's  
> built.
> 
> This causes a problem with git, causing merge conflicts.
> 
> Is there a way I can configure git to /always/ do the equivalent of 'git  
> pull -f', but only for that one file?

Take the file out of the repository.  If its being rebuilt everytime
you build, why are you tracking it in Git?

Git is for tracking *sources*.  That file sounds like its an output,
which shouldn't be tracked.

-- 
Shawn.

```

## Jakub Narebski, 2007-01-26 13:02

Subject: Re: Per-file force update
Message-ID: <epcu2g$vrv$2@sea.gmane.org>
URL: https://gitlist.dev/e/epcu2g%24vrv%242%40sea.gmane.org
In-Reply-To: <op.tmpzmzvtzidtg1@rygel.lnxi.com>

```
Troy Telford wrote:

> I've got a file that (due to some inner workings) changes whenever it's  
> built.
> 
> This causes a problem with git, causing merge conflicts.
> 
> Is there a way I can configure git to /always/ do the equivalent of 'git  
> pull -f', but only for that one file?

Ignore this file, using either .gitignore or .git/into/excludes.
You should not track output files in git (well, in principle).
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```
