Skip to content

Instantly share code, notes, and snippets.

@stokito
Last active February 16, 2024 07:44
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stokito/434a129e4758489577502597c0a8c42b to your computer and use it in GitHub Desktop.
Save stokito/434a129e4758489577502597c0a8c42b to your computer and use it in GitHub Desktop.
git: create a single patch file with multiple commits
# last three commits
git format-patch -3 --stdout > multi_commit.patch
# all commits that are in your branch and not in master into a single patch file multi_commit.patch
git format-patch --signoff master --stdout > multi_commit.patch
# create patches in the folder ~/output/directory/ for all commits that are in your branch and not in master
git format-patch -o ~/output/directory/ --signoff master
@stokito
Copy link
Author

stokito commented Feb 16, 2024

you din't applied or committer the first patch

@SunaMadhu16
Copy link

applied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment