Unity 5 Git Problem Moving Files

I’m working with Unity 5 and Git. I’m ignoring the Library Folder.

When I move a file (for example one material to another folder) and then commit the changes. When I pull the changes on the other PC, the scene lost the reference to the moved material (it only regenerates the materials on the old empty folder).

I tried to copy manually Library/metadata from my PC to the destination PC and works fine, but I read Library folder doesn’t need to be shared.

Thanks!

My .gitignore:

[Ll]ibrary/
emp/
    [Oo]bj/
    [Bb]uild/
    
    # Autogenerated VS/MD solution and project files
    *.csproj
    *.unityproj
    *.sln
    *.suo
    *.tmp
    *.user
    *.userprefs
    *.pidb
    *.booproj
    
    # Unity3D generated meta files
    *.pidb.meta
    
    # Unity3D Generated File On Crash Reports
    sysinfo.txt

Your git ignore looks good and you’re right, you shouldn’t be committing the Library to source control.

Usually Unity handles moving files etc pretty well although in some cases I’ve found that after pulling the latest, deleting and allowing the Library folder to be automatically rebuilt fixes some issues (close the editor, delete the library folder and re-open the editor).

Also just make sure that you are working with visible meta files and that these too are being committed to source control.