diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-06 12:34:58 +0100 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-06 12:34:58 +0100 |
commit | 23deb76dc2da8fdbe3f4e75e13ba2967f84919a4 (patch) | |
tree | 9a3f54f4c3450b96668c2ec83f8905e671bdd3d6 | |
parent | 773925056395b0544b08ccb708c1f2f1bc9508bb (diff) |
Add git archiving
-rw-r--r-- | git.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -21,3 +21,12 @@ git diff > change.patch patch -p1 < change.patch # -p1 to remove the a/ and b/ from filepaths + +## Exporting a commit + + git archive <commit> + +Outputs to stdout a tar archive of the index at the given commit. Make a +directory of just the code, not a repo: + + git archive <commit> | tar --extract --directory <output dir> |