git patch

https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/

workflow

  1. git format-patch HEAD^n..HEAD  (it patches the commit excludes the last nth and includes the head; e.g., n = 1, then it patches only the last commit), then you will see a file usually beginning with 00.
  2. scp the patched file to the destination, another machine or maintainer
  3. on the destination, git am patch_file_path (the patched file has directory information of the repository, so it does not matter under which directory you run this command)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s