On Thu, 2013-09-19 at 20:09 +0100, Andy Hardy wrote:
> On 19/09/2013 19:25, Armando Freire wrote:
> > git archive -o ./TAGver.zip TAGver $(git diff --name-only startTAGver
> > endTAGver --diff-filter [AMCRT])
> I'm not really uptodate on Bash scripting, but what does the $(git 
> diff...) do?

$(cmd ...) is the new-fangled way of writing `cmd ...` and does the same

So, the above command runs the "git diff ..." command then runs the "git
archive ..." command with the results of the git diff command passed as

Because git diff is run with the --name-only flag, it's just printing
filenames not the actual diff output, so those files are passed as
arguments to git archive.

Tip: if you want to see what the shell is doing you can use "set -x" to
enable a debug mode, then run the command above from the prompt.  Run
"set +x" to turn it off again.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to