Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Google Drive icon file issues with SourceTree

Tim Scullin July 23, 2013

I am having some issues with the google drive 'icon' files.

I get the error:

'git status' failed with code 128:'fatal: Reference has invalid format: 'refs/Icon

Ive updated the global ignore list and the git repo ignore list but no luck..

Is there anything else I can do?

Thansk!

Tim

5 answers

1 accepted

0 votes
Answer accepted
Tim Scullin July 28, 2013

Ok so git repo's get corrupted if you add any other files inside .git?

And since we can't set google drive to ignore it will always error :( Only way would be to use some kind of script that would detect and delete icon files in .git folders, wait for google to set up ignore settings or move git repos out of google drive..

I think the latter may be the way to go.

Thanks!

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

Not any other files, there are some locations you can add things (such as hooks), but you're definitely not allowed to add random files inside of the .git/refs area because thats effectively a database of branches / tags etc and any new files will be iterepreted as the same thing, which is why they corrupt the repo.

1 vote
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2013

Ok, if Google Drive is adding files of its own inside the .git folder, it's always going to corrupt Git repositories. The only answer if you can't stop Google Drive doing this is not to put git repo's there.

0 votes
Manuel Klarmann August 30, 2013

by deleting the Icon? file in .git I got it working again - but this is really just a temporary solution. Any idea for permanent?

KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2013

It's not a question for SourceTree unfortunately as it's Google Drive causing the problems with your .git directory. It sounds like the solution is to not use Google Drive as it adds metadata to important directories which shouldn't be changed in any way.

0 votes
Tim Scullin July 24, 2013

It's in a local google drive folder and the drive app creates "Icon" files in each folder which is used to update the folder icon (uploading, complete, shared etc). So each folder created in drive gets the Icon folder.

And thats what "refs/Icon" is refering to.

I want to ignore the icon file, but I can't see a work around..

And there's no way to do ignor folders in google drive either :S

ellery-mckenzie August 3, 2013

I wonder if we could do some file permissions trickery so that google drive only has read access to the repository?

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2013

I'm not sure it's actually the files on disk (working copy) that are the issue here, there seems to have been an invalid reference set in the repository itself, under .git/refs/Icon, which is causing the repo to be corrupt. Do you know how those got there? It's usual to have just heads/remotes/tags/stash dirs underneath .git/refs.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events