Skip to content

Instantly share code, notes, and snippets.

@DavidObando
Created August 26, 2016 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidObando/e11f0645af61652890e664cfc7b84d83 to your computer and use it in GitHub Desktop.
Save DavidObando/e11f0645af61652890e664cfc7b84d83 to your computer and use it in GitHub Desktop.
Git patch cheatsheet
git checkout master
git checkout -b mybranch
git add myfile
git commit -m "add myfile"
git format-patch master --stdout > addmyfile.patch
~~~
git checkout master
git checkout -b myotherbranch
cat addmyfile.patch | git am --signoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment