copy a git repository without revisions (without .git and .gitingore) from a remote server
git
Solution
You can use the command
git archive branchname
to archive files from a named tree. I.e. you can pass the output to `tar` to pack the files or filter files like `.gitignore` (`.git` will not be exported):
git archive branchname | tar -x -C c:\git-my-branch
Checkout out `git help archive` for more details.
The equivalent of `svn export . otherpath` inside an existing repo is
git archive branchname | (cd otherpath; tar x)
The equivalent of `svn export url otherpath` is
git archive --remote=url branchname | (cd otherpath; tar x)
Problem
How to copy a git repository directly form remote server without .git directory and .gitignore files?. In advance from a tag name or branch.