How to handle gramps.pot under Git?

I am experimenting various customisations and features in Gramps as a forking branch in Git.

Since all this is based on an official version becoming nowadays stale, I decided to rebase my work on the current 6.0.3 release.

As expected, there are conflicts I must resolve manually. However, I did not anticipate a major issue with gramps.pot. This file is ~40k lines long and shows a lot of conflicts. But these conflicts are generally “false positives” because they occur mainly on the location comments (my patches changed the line number where the strings appear or official code refactorisation split long lists into individual items with the same effect). Therefore most conflicts are not semantically significant.

I have no conflict with <lang>.po because I don’t translate while experimenting.

Since gramps.pot is in fact generated as part of the translation process, is there a way to exclude it from Gramps attention in my repository clone? Would mention the file in .gitignore have adverse effects?

What is my best approach? Should I cancel my current rebase and start again after screening gramps.pot?

.pot files are used by human translators, so you can ignore that file.

I aborted my rebase to add po/gramps.pot in .gitignore.

Unfortunately when I launch again my rebase, po/gramps.pot comes into the way. Is there a git command to completely discard po/gramps.pot?

@pgerlier If I understand @hartenthaler 's reply, you would not want to merge your changes to the gramps.pot file during conflict resolution, i.e. you can “accept theirs” i.e. ignore all your changes and just accept what the current version is.

If this is correct, then you can use your favorite git mergetool (VSCode or whatever) to go through and accept all incoming changes blindly. A quick google search says these commands might also do the trick, but you may need to experiment:

git checkout --theirs -- <gramps.pot filename>
// verify there are no diffs
git add <gramps.pot filename>

Thanks @codefarmer.

What I finally ended up is to use command git rm po/gramps.pot after every replay of commits. I could complete my rebase but I need to validate it because there is an issue with the DB version (as expected).

Incidentally, I don’t understand why listing po/gramps.pot in .gitignore does not work. Is this because I introduce a discrepancy between the official repo and mine?