0

So I've used a lot of git.

Lately I've taken up modding a game, and the base framework I need to monitory for changes/additions is quite large.

However when it comes to distributing any mod I create, I don't need or want to ship the entire assets...

I know I can use git, fork the main branch, then diff the two when my mod is done.

I just want to know if anyone has a better suggestion.

Nocare
  • 9
  • 4

1 Answers1

0

Maybe you can use git archive and pipe it to a tar/zip command (as suggested here: Do a "git export" (like "svn export")?), but adding with the branch name, the location of your mod

git archive --format zip --output /full/path/to/zipfile.zip yourbranch folder/containing/your/mod

So you can end with your mod at a specific branch/other git object state, without having all the rest of the project.

Update

This command did put me alone the right search path and I came across this working command in another stack thread.

git archive --format zip -o export.zip head $(git diff --name-only master head)
Community
  • 1
  • 1
padawin
  • 4,230
  • 15
  • 19
  • Hmm this does work but I will have to keep a manifest of all my files, and at that point a simple shell script would work. Its an issue, because its not '/game/mods/mymod'. I have to follow the same directory structure as the game assets (mostly), so that means picking out many files all over the place. – Nocare Jul 23 '14 at 10:42
  • I actually found a solution and updated this answer. – Nocare Jul 23 '14 at 11:21