How to fix error: wrong type for object in Git | DevErrors