Reputation: 29
Does this file rebuild itself? I am deleting from project some old files and classes. When I was looking for instances and uses of this classes I have found entries of them in .gitattributes. So I am wondering if I should delete those entries also from there, or does git will rebuild .gitattributes properly later?
Upvotes: 2
Views: 2363
Reputation: 3967
As you can read in teh Git documentation here the .gitattribute
file contains attribute values for some paths. If there is more then one entry in a path the last one appended to the file is evaluated.
So maybe in you file there are information about the file that you deleted (e.g. that has been deleted), in case just start checking from the tail of the file.
Anyway I deleted thousend of times files from my repo and I never touch the .gitattribute
so I suggest you to just let it be.
Upvotes: 1
Reputation: 94676
Git doesn't rebuild the file so you can edit it to your taste. Remove anything you don't need. Don't forget to add and commit it.
But git can restore the old content if you checkout older branch, tag or commit. Of course if you later checkout the head of the branch git restores the new content again.
Upvotes: 0