Reputation: 157
Example: Git Repository abc.git contains tracked files abc-home.txt and abc-artifact.img
When I do git clone I get the files and git creates a .git directory with the meta information. Can I ask git to give me just the files without the meta information?
clarification Edit: I'm pulling from a remote bare repo.
Upvotes: 1
Views: 90
Reputation: 25471
You can use git archive
and extract it immediately using tar
:
git archive <branch-name> | tar -xC ./extract-here
Or if you're fine with an archive, you can create a zip of your repository:
git archive --format zip --output <repository.zip> <branch-name>
If you don't have a clone of repository locally, just add option --remote=<repository-url>
to the git archive
command.
Upvotes: 2