ryan
ryan

Reputation: 6655

Git archive all changes except first commit

I have a third party product I need to make changes to. I've committed all of the stock code as my first commit. Now I've committed several times and made many changes.

How can I export an archive of just the changes? I want all adds/changes since the first commit but nothing in the first commit if it hasn't been modified. There will have been no deletes to files that occurred in the first commit.

Upvotes: 1

Views: 212

Answers (1)

VonC
VonC

Reputation: 1329782

I would suggest the patch format, with a git format-patch

git format-patch --stdout firstCommitSHA1.. > aPatch

With firstCommitSHA1 being your first commit: it will select everything after that first commit up to your current HEAD, and generate patches easily applied to another repo through git am.

Upvotes: 4

Related Questions