Domanda

For files like .project files... i do want those files checked in initially...

however... after the initial git clone, the user will one time only edit this .project file (different for each workstation), and then will never touch it again.

I'd like git to then ignore all changes for that file.

However, there is a time when i might need to update the .project file that will be created during checkout.

Is there someway to "checkout then ignore all further changes"?

È stato utile?

Soluzione

Found it here.

Fortunately GIT has a very easy solution for this, just run the following command on the file or path you want to ignore the changes of:

git update-index --assume-unchanged <file>

If you wanna start tracking changes again run the following command:

git update-index --no-assume-unchanged <file>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top