Created
April 24, 2014 15:54
-
-
Save danman01/11259686 to your computer and use it in GitHub Desktop.
fix bad dropbox backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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