Reputation: 803
I have multiple git repositories and would like to generate a big .diff file for each repository.
This .diff patch would then be applied by a customer using something like the 'patch' utility to generate the files in the repository minus git history.
Does anyone know how I would be able to do this?
Thanks for your time, Matt
Upvotes: 0
Views: 203
Reputation: 803
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 > diff-against-nothing.patch I discovered git's magic empty SHA1!
Upvotes: 1
Reputation: 312430
If you want to diff against nothing...why not just do that?
$ mkdir empty
$ ls
empty myproject
$ diff -ruN empty myproject > diff-against-nothing.patch
Upvotes: 1