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
make a backup of your repo if you aren't sure about this one, because these commands are irreversible.
first, go to your repo directory.
cd myrepo
then recursively search for the conflicted files and delete them
find . -type f -name "* conflicted copy*" -exec rm -f {} \;
lastly, remove any "conflicted" references from git's packed-refs file
awk '!/conflicted/' .git/packed-refs > temp && mv temp .git/packed-refs