Git conflict “both deleted”

As stated in this answer (suggested as a duplicate) : you can see a “both deleted” when branchA has a git mv oldfile newstandard commit, and branchB has a git mv oldfile newcustom commit. In that case, when trying to merge customBranch into standardBranch, git will report a conflict on three files : both deleted: … Read more

Can I delete data from the iOS DeviceSupport directory?

The ~/Library/Developer/Xcode/iOS DeviceSupport folder is basically only needed to symbolicate crash logs. You could completely purge the entire folder. Of course the next time you connect one of your devices, Xcode would redownload the symbol data from the device. I clean out that folder once a year or so by deleting folders for versions of … Read more

Deleting read-only directory in Python

shutil.rmtree can take an error-handling function that will be called when it has problem removing a file. You can use that to force the removal of the problematic file(s). Inspired by http://mail.python.org/pipermail/tutor/2006-June/047551.html and http://techarttiki.blogspot.com/2008/08/read-only-windows-files-with-python.html: import os import stat import shutil def remove_readonly(func, path, excinfo): os.chmod(path, stat.S_IWRITE) func(path) shutil.rmtree(top, onerror=remove_readonly) (I haven’t tested that snippet out, … Read more

Python: Difference between os.remove() and os.unlink() and which one to use?

Note: When this question was originally asked, it had a python-2.7 tag, which has since been removed. See the comments of this answer for discussion on the changes made in Python 3. They are identical as described in the Python 2.7 documentation: os.remove(path): Remove (delete) the file path. If path is a directory, OSError is … Read more