Shiki

I'm so bad with words that I can't even make a cool tagline

“Ignoring funny ref” error on Git + Dropbox

At Twidl HQ, we use a combination of Git and Dropbox for managing our source code. It’s a simple but awesome setup. Sometimes, we get this really cryptic error when fetching from our main repo (our shared Dropbox folder):

Ignoring funny ref 'refs/remotes/origin/master (Shiki's conflicted copy 2010-01-14)' locally

It seems to happen when 2 people push to origin/master at almost the same time. This makes Dropbox update the same file and seems to be the cause of the error. When this happens, you can bet that one of the people who did the push will lose his changes to origin/master. So you’ll have to fix it accordingly.

The “funny ref” error does not have any critical effect on the repo and Git seems to work perfectly. It will just annoy you every time you try to fetch. It turns out that this "master (Shiki's conflicted copy 2010-01-14)" is a branch in the main repo. Simply deleting it will remove the error. In terminal, go to your main repo’s (Dropbox) root folder:

git branch -d "master (Shiki's conflicted copy 2010-01-14)"

If you’re not sure of the name of the conflicting branch, you can execute git branch to show all branches. There should at least be a “master” branch and your conflicting branch.

9 Responses to “Ignoring funny ref” error on Git + Dropbox

Hi! Thanks for writting this post. It was the only reference I’ve found to this issue… :| I’m finding the same problem myself (using dropbox too), but I’m not being able to solve it the same way you did.

Here’s what I’m seeing:

$ git pull error: * Ignoring funny ref 'refs/remotes/origin/master (fcorreia's conflicted copy 2010-07-14)' locally Already up-to-date. $ git branch "merge" "master (fcorreia's conflicted copy 2010-07-14)" fatal: Not a valid object name: 'master (fcorreia's conflicted copy 2010-07-14)'. $ git branch * master

Any thoughts that might help?

Thanks!

From my experience, you could no longer merge with that branch. It seems to be a corrupted branch file because it was overwritten by somebody else who pushed to the dropbox repo.

Deleting the branch didn’t work for you? Are you deleting it from the dropbox repo? When I get errors like this, I just delete that conflicted branch and fetch-merge-push again. I never lost any of my commits due to the conflict. They just didn’t get pushed properly because of dropbox’ syncing conflicts.

I’m not being able to delete it. In fact, it’s not showing up when I list the branches (only “master” shows up). It seems there isn’t actually a branch named “master (fcorreia’s conflicted copy 2010-07-14)”.

Ok, I think i’m on to something. I’ve just checked my repo files (on dropbox) and found these two files on the path “/refs/heads”:

master master (fcorreia's conflicted copy 2010-07-14)

It seems that this “master” file as conflicted, so dropbox automatically copied it to another filename. I wonder if I can just delete this file from the repo without leaving other garbage behind, and without losing commits.

Yes that’s right. You should use the repo on Dropbox. I’ve deleted conflicted branches like that with no problem. All I had to do was fetch-merge-push again to put my local changes to the Dropbox repo. Use branch -D to delete it if you can’t delete it with “branch -d” (small d).

Also, notice that your Git repo actually still works with that conflicted copy in there. It just annoys you with the warning message when you fetch.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>