In git version 1.7.9.5 this seems to work to export a single file from a remote
git archive --remote=ssh://host/pathto/repo.git HEAD README.md
This will cat the contents of the file README.md
.
More Related Contents:
- How to sparsely checkout only one single file from a git repository?
- Is it possible to do a sparse checkout without checking out the whole repository first?
- How do I check out a remote Git branch?
- How do I revert a Git repository to a previous commit?
- How can I reset or revert a file to a specific revision?
- How to find and restore a deleted file in a Git repository
- How do I revert all local changes in Git managed project to previous state?
- How can I move HEAD back to a previous location? (Detached head) & Undo commits
- Merge, update, and pull Git branches without using checkouts
- How can I get the latest tag name in current branch in Git?
- Sparse checkout in Git 1.7.0?
- Rollback to an old Git commit in a public repo
- Difference between git checkout –track origin/branch and git checkout -b branch origin/branch
- Checkout subdirectories in Git?
- What’s the difference between Git Revert, Checkout and Reset?
- What is git tag, How to create tags & How to checkout git remote tag(s)
- How do I find and restore a deleted file in a Git repository?
- How can I check out a GitHub pull request with git?
- Set Git submodule to shallow clone & sparse checkout?
- Git checkout: updating paths is incompatible with switching branches
- git: Switch branch and ignore any changes without committing
- What is the difference between “git branch” and “git checkout -b”?
- Restore a deleted folder in a Git repo
- How do I reset or revert a file to a specific revision?
- Alter repository directory structure using sparse checkout
- Switch branch and ignore any changes without committing
- Git push error: Unable to unlink old (Permission denied)
- Unstage a deleted file in git
- “Cannot update paths and switch to branch at the same time”
- Why do excluded files keep reappearing in my git sparse checkout?