0

What I am trying to do is to have git ignore specific pieces of text per file type, and store those settings so can be used through out a project.

The issue is that my IDE adds specific lines/text on files, that I would like Git to ignore and not count as changes. For example:

for .xml files, ignore text like this: <modified>2019-01-01</modified>.

for .txt files, ignore text like this: "# last comment by" and "sequence:"

for .properties files, ignore text like this: "some text to ignore"

etc etc

So, using the examples above, if the only change to an .xml file is the <modified> tag data, git should not consider this as a modified file.

What I would like to do is store those settings in a config file so that can be used though out the project. I am currently using SourceTree so if there is a SourceTree specific solution it would be nice to use but I couldn't find anything.

user2287359
  • 497
  • 1
  • 5
  • 16
  • 1
    Possible duplicate of [How to tell git to ignore individual lines, i.e. gitignore for specific lines of code](https://stackoverflow.com/questions/16244969/how-to-tell-git-to-ignore-individual-lines-i-e-gitignore-for-specific-lines-of) or of https://stackoverflow.com/questions/6557467/can-git-ignore-a-specific-line (better) – msanford Jun 07 '19 at 18:48
  • Possible duplicate of [Can git ignore a specific line?](https://stackoverflow.com/questions/6557467/can-git-ignore-a-specific-line) – phd Jun 07 '19 at 19:27

0 Answers0