Last Updated: February 25, 2016
·
223
· shadowmint

Git - Pull in branch as a patch

Using patch files? Stop already. You know they get out of date as soon as you make them. Using a patch branch in git instead.

The import your patch using:

  • git diff patch.config-hacks > ~/patch; patch -p1 < ~/patch

Or, if you don't want to patch like the entire branch diff, use a specific path:

  • git diff patch.no-pants config/ > ~/patch; patch -p1 < ~/patch