threads / discuss / 6526

Per-file force update

Subject: Per-file force update

## tl;dr

3 messages between Jan 25, 2007 and Jan 26, 2007.

replies: 2people: 3as markdown or json

Troy Telford· Jan 25, 2007, 17:17 UTC · lore

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· Jan 25, 2007, 17:22 UTC · re: Troy Telford · lore

Re: Per-file force update

Troy Telford <ttelford.groups@gmail.com> wrote:
Show 7 quoted lines
> 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· Jan 26, 2007, 13:02 UTC · re: Troy Telford · lore

Re: Per-file force update

Troy Telford wrote:
Show 7 quoted lines
> 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

← back to recent threads