git lfs fails to track a file after I rename it

995 Views Asked by At

I keep running into this issue where I rename a file that is being tracked under git lfs, and when I push up the change to my repo, the file is no longer being tracked by git lfs.

Does anyone know how to resolve this?

2

There are 2 best solutions below

0
On

Apparently git add --renormalize . resolves this issue.

0
On

I erased the line of the file from .gitattributes and then ran git lfs track <new_file_path>