I am using Dropbox
to sync a git
repository, but now when I try and push
I am getting an error:
fatal: Reference has inval
I was getting same error
fatal: Reference has invalid format: 'refs/heads/somebranch (1)'
for the following command
git branch
Then, I searched for erroneous name (branch name followed by (1) ) using the command
find . -name 'somebranch (1)'
And it showed the following result
./.git/refs/heads/somebranch (1)
Which is some duplicated version of somebranch IMO. So, I removed this by executing the find command following by delete
find . -name 'somebranch (1)' -print -exec rm -rf {} \;
Then the branch command run successfully
git branch