Browse Source

Add get-git-file

master
Nicolas Lenz 10 months ago
parent
commit
a5f146902c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      get-git-file

+ 7
- 0
get-git-file View File

@@ -0,0 +1,7 @@
1
+#!/usr/bin/env zsh
2
+
3
+# Gets a single file from a git repo. Doesn't work on GitHub as they don't support git-archive!
4
+# Arg 1: Repo URL
5
+# Arg 2: File name
6
+
7
+git archive --remote=${1} HEAD ${2} | tar -x

Loading…
Cancel
Save