Git fetch repeatedly tells me about the same new branch

In one particular repo, when I run

git fetch

He does everything he has to do, but also reports:

 * [new branch]      Story/abc-123 -> origin/Story/abc-123

everytime.

if I run git branch -r | grep abc-123, it gives:

origin/story/abc-123

Note that in the output from the "History" sample, the title is capitalized, but in the -r branches it is not. The problem seems to be local. I do not have this problem if I create a new repo clone elsewhere, but I would prefer not to follow this road if I can avoid it.

Is there any way to stop this?

+4
source share
1 answer

The problem is that your directory ./git/refsis in a different case for part of the branch name compared to the actual remote one. 1.e., git branch considers the branch lowercase:

$git branch 
...
origin/story/abc-123
... 

, - :

$ls .git/refs/remotes/origin
...
Story
...

-, refs, git , , , :

mv .git/refs/remotes/origin/Story .git/refs/remotes/origin/story
+5

All Articles