Resource.Designer.cs under git Resource.Designer.cs under git git git

Resource.Designer.cs under git


Our dev teams address this by committing the Resource.Designer.cs to our Git repo. After that, each developer can run git update-index --assume-unchanged Resource.Designer.cs to make Git ignore updates to that file.

After updating the index, changes made to the Resource.Designer file will not appear in the "Changes not staged for commit" section when doing a git status.

If a commit to that file becomes necessary just execute git update-index --no-assume-unchanged Resource.Designer.cs and Git will start tracking changes to that file again.


There are several ways to address this issue in git. See: https://gist.github.com/canton7/1423106. The link deals with config files but you can apply it to your situation as needed.

I think simplest way to solve this is commit the file as Resource.Designer.cs.in, and then after cloning manually copy it to Resource.Designer.cs. Also add Resource.Designer.cs to your .gitignore file.