Skip to contentSkip to conversation

Per-file force update

DISCUSSION Troy Telford 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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,

Signature · 1 line
Troy Telford
#1 lore raw
Quoted 7 lines · Troy Telford

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.

Signature · 1 line
Shawn.
#2 lore raw
In reply to Troy Telford
Quoted 7 lines · Troy Telford

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).

Signature · 3 lines
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git