Monday, 17 February 2014

Git: creating and importing patches

A useful command when you need to contribute to open source projects:
1. Create a patch from your last commit (-n for the n latest commits). The following command will create a <myKillerPatch>.patch file in the current directory
   git format-patch -1
2.  Test the patch
   git apply --check <myKillerPatch>.patch
3. Finalyy import it
   git am <myKillerPatch>.patch

No comments:

Post a Comment