You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-16Lines changed: 32 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,28 +9,20 @@ The purpose is to separate big-file caching from revision-control. There are sev
9
9
But all those impose the penalty of checksums on the large files. We assert that the large files can be uniquely derived from URLs, versioned in S3 or by filename, etc. We store only symlinks in the git repo.
10
10
11
11
## Installing
12
-
Just call it `git-sym` and put it in your PATH. Here is one way:
12
+
You can run this as a **git** command by calling it `git-sym`
13
+
in your `$PATH`. Here is one way:
13
14
```
14
15
ln -sf `pwd`/git_sym.py ~/bin/git-sym
15
16
```
16
-
17
-
## Using
18
-
* Instead of a large file, create a symlink to `.git_sym/unique_filename`.
19
-
```
20
-
ln -sf .git_sym/unique_filename my_filename
21
-
```
22
-
* Add a rule to `git_sym.makefile` which can retrieve `unique_filename`.
23
-
```
24
-
unique_filename:
25
-
wget http://mysite.com/unique_filename
26
-
```
27
-
* Then, `git-sym update` will automatically retrieve the file and fill in the symbolic links.
17
+
Alternatively, you can run it directly:
28
18
```
29
-
git-sym update
19
+
python git_sym.py -h
30
20
```
31
21
32
-
An example will clarify this. (For more detailed examples see
You can test it right here. The `links` directory has some examples.
@@ -54,6 +46,22 @@ git-sym update links/foo
54
46
# python git_sym.py update links/foo
55
47
cat links/foo
56
48
```
49
+
50
+
## How it works
51
+
* Instead of a large file, create a symlink to `.git_sym/unique_filename`.
52
+
```
53
+
ln -sf .git_sym/unique_filename my_filename
54
+
```
55
+
* Add a rule to `git_sym.makefile` which can retrieve `unique_filename`.
56
+
```
57
+
unique_filename:
58
+
wget http://mysite.com/unique_filename
59
+
```
60
+
* Then, `git-sym update` will automatically retrieve the file and fill in the symbolic links.
61
+
```
62
+
git-sym update
63
+
```
64
+
57
65
## Breaking the link
58
66
To break it, remove the file from the cache and from its
59
67
origin.
@@ -122,6 +130,14 @@ We use that to learn the actual location of the `.git/` directory. If it fails,
122
130
123
131
Again, we expect you to forget that, so we add that alias to your local repo for you. Believe us: It's a Good Thing.
124
132
133
+
### git-sym-test
134
+
This module provides a way to test **git-sym**. It is not required.
135
+
However, it is listed as a git-submodule here for conveniently
136
+
testing submodule support.
137
+
```
138
+
git submodule update --init
139
+
```
140
+
125
141
### .gitignore
126
142
Since the intermediate symlink is also in the repo, but points to a changing target, it needs to be listed in `.gitignore`. (That anticipates both accidental `git add` and `git clean`.) We expect you to forget that important rule, so **git-sym** will detect its absence and add it to `.git/info/exclude` instead. No worries.
0 commit comments