git pull won’t work if you’ve made local changes to the code (error message: error: Entry <locally modified file> not uptodate. Cannot merge.)

To get past this, you need to reverse the patches applied. The simplest way is to do patch -R < <path to patch>. The other way is to do git-apply -R <path to patch>.

Strangely, (on my system) it cannot find git-apply, so I have to provide the whole path: /usr/lib/git-core/git-apply