Skip to content

Instantly share code, notes, and snippets.

@danman01
Created April 24, 2014 15:54
Show Gist options
  • Save danman01/11259686 to your computer and use it in GitHub Desktop.
Save danman01/11259686 to your computer and use it in GitHub Desktop.
fix bad dropbox backup
#make a backup of your repo if you aren't sure about this one, because these commands are irreversible.
#first, go to your repos 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment