I know how to ignore specific lines completely in git using gitattributes (see How to tell git to ignore individual lines, i.e. gitignore for specific lines of code), but how would I go about ignore changes to a specific line?
I assume we can use a filter very similarly, but I don't know what my sed script should do to ignore the changes to the line.
For a practical example, I am writing up a C# library that needs a specific build output path depending on the project it's used in as a submodule. Thus, it has to be configured manually wherever it's being used, but that change must not be commited to the library itself.
Original Library.csproj:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<OutputPath>bin\Debug\</OutputPath>
...
</PropertyGroup>
Submodule Library.csproj:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<OutputPath>..\Target\</OutputPath>
...
</PropertyGroup>
How do I get git to ignore the change to this line?