1

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.

ryan
  • 6,541
  • 5
  • 43
  • 68
  • 1
    What exactly do you mean by "an archive"? IF you just want a patch, you could run a `git diff` between the root commit and `HEAD`. – Lily Ballard Dec 01 '11 at 19:43
  • 1
    I mean stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export – ryan Dec 04 '11 at 01:44

1 Answers1

4

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250