On Jun 20, 7:50 am, David Bruce <davidstuartbr...@gmail.com> wrote:

> My program uses gettext, so the *.po files get modified whenever a
> "make dist" is run.  Usually this just updates the "POT-Creation-Date"
> timestamp line.  As a result, whenever I try to merge two branches,
> all the *.po files inevitably conflict.  I then have to go through all
> 40 or so of these files and delete one of the timestamp lines and the
> conflict markers.
> Is there some way to tell git merge that if a file meeting the pattern
> "po/*.po" has been modified in both branches, to simply keep one or
> the other, rather than generating files with conflict markers?

I'm not sure about ignoring, but you could do this:
1) Merge with --no-commit;
2) After merging run
    $ for f in *.po; do git checkout --ours -- "$f"; done
3) git commit

This will of course suck if a .po file being merged really contain
some important change.
But anyway if you would ignore such file it would end up unmerged
which would effectively make any changes introduced to that file by
the merged commit disappear.

It might turn out that --no-commit is not really needed since if
merging fails due to conflicts, the commit is not done anyway.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to