What's the best way to extract a tree from a git repository? -
Removing a block from an arbitrary modification is easy with git shows
, e.g. :
GIT show master: src / hello-world.c> /tmp/hello.c
However, I want to know whether git is similar to extracting a tree (directory) and under which everything is continuously?
I have written this a small script, so I will add it as a possible answer. It seems that this is something that can be made well in GIT, but I do not know how to find it ...
You can use git archive
for this.
git archive master: src / | Tar -C Destination -x
Comments
Post a Comment