Reputation: 5174
Sorry for the poor quality of the question itself, but I'm running into a case where the only language I know collides with the existing jargon. Please feel free to point me in the direction of the correct jargon, since I suspect that I could have searched for this answer if I knew it.
I want to create a 'patch' using git that contains the files necessary to change from one version of a project, to another. I don't want an actual GIT patch that updates a master based on the output of a branch, but rather something similar to a zip containing all files changed since a given update.
The situation is that I don't want to simply push the entire contents of the updated version to the server (there's lots of files that haven't been changed), but at the same time I don't want to have to go through and hand-pick around 300 files.
I know that GIT does have an FTP deployment option of some kind, but the service we're using doesn't provide that, so as far as I can tell what I need is something similar to a commercial delta patch that gets distributed whenever a company updates a product. I find it highly unlikely that GIT doesn't provide SOMETHING similar to this functionality, but I don't know where/how to find it.
Edit: Since it looks from one answer like it might be relevant, this if for a web application, so I'm talking about tracking css, php, html, and js files, probably with some art wound up being thrown in even though source control systems don't work well with art.
Upvotes: 2
Views: 700
Reputation: 97282
OK, if we say about GUI-centric windows solution around GIT, I'll be able to see additional exotic perversion (Git-fanboys, sit down!!!):
TortoiseHG (1- Windows 2 - GUI 3 - for Mercurial SCM) with hg-git extension
Add git-repository into THG, use context-menu in changesets-pane, Export - Archive - "Only files..."
Both screenshots are from my git-repo, fully handled by TortoiseHG
Upvotes: 0
Reputation: 97282
If piping diff to xargs is too hard for you, you can try
git archive
and git diff
in form git archive -o update.zip HEAD $(git diff --name-only HEAD^)
Upvotes: 4
Reputation: 4685
Ron, I hope this helps:
git diff --name-only HEAD HEAD^
CCodeClasses.cpp
CCodeClasses.h
CTypeClasses.cpp
CTypeClasses.h
CTypeResolver.cpp
CTypeResolver.h
DFSearch.cpp
DFSearch.h
Util.cpp
Util.h
x32wrapper.cpp
x32wrapper.h
mfcreplacements.h
where you can replace HEAD with the commit ID's you want to get the list of changed files and then pipe that to a tar command or something. I'd love to know if there's a better way to do this, because I need to do the same thing from time to time.
Upvotes: 2