9

A link was graciously provided to a PR on GitHub to fix an issue that I am watching in the Jira issue queue. The fix is only one line of code that changes a display, so I am confident applying the fix without upgrading my installation will not have unintended consequences in this particular case.

Obviously, I can change the one line of code by hand, but in the interest of trying to use best practices, I'd like to understand the best way of using Git itself to apply the change. I have Git installed on my server and use a private GitHub repository for our organization's code base.

The "GitHub for CiviCRM" documentation (http://wiki.civicrm.org/confluence/display/CRMDOC/GitHub+for+CiviCRM) is geared towards those contributing to the codebase rather than those who need to apply a supplied fix.

1 Answer 1

12

Applying a patch to a standard install doesn't require you to switch it over to Git. You can just apply the patch from a given PR (let's say it is PR #12345) like so from the command line:

cd path/to/civicrm
wget https://github.com/civicrm/civicrm-core/pull/12345.diff
patch -p1 < 12345.diff
rm 12345.diff
1
  • 1
    1 2 3 4 5? That's the kind of combination an idiot would put on his luggage!
    – Coleman
    Commented Aug 11, 2015 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.