Skip to content

Instantly share code, notes, and snippets.

@h0st1le
Last active December 14, 2015 01:48
Show Gist options
  • Save h0st1le/5008438 to your computer and use it in GitHub Desktop.
Save h0st1le/5008438 to your computer and use it in GitHub Desktop.
Git creating and submitting a patch via email (Example)
# change to local checked-out copy of repository
cd git.git
# update
git fetch # or "git pull" if you want to merge as well
# make changes on a local topic branch
git checkout -b my_topic origin/master
# make/test changes
vi file_to_be_changed
# review changes
git diff
# commit changes
git add file_to_be_changed
git commit -s
# run test suite
make clean && make test
# prepare patch
git format-patch origin
# send the email (dry run, test run)
git send-email --dry-run --to [email protected] patch_file
git send-email --to [email protected] patch_file
# send the email (for real)
git send-email --to [email protected] patch_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment