duplicate ref file
# inspect
# inspect suspicious refs
find .git/refs/heads -maxdepth 1 -type f -name '* 2*' -print
# expected out put
# refs/heads/icloud 2
# delete the bad duplicated ref
rm ".git/refs/heads/icloud 2"
# fetch again
git fetch --prune
# verify
git branch -vv
git statusduplicate remote tracking
# inspect
find .git/refs/remotes -type f -name '* 2*' -print
# delete duplicated then
git fetch --pruneTiny Git goblin note
Never edit/delete random files inside
.gitcasually,
but theseicloud 2duplicate ref files are exactly the kind of iCloud ghost files we can safely remove.