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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -