Skip to content

Commit bb83a5d

Browse files
committed
updated README
1 parent 47b4713 commit bb83a5d

File tree

3 files changed

+36
-16
lines changed

3 files changed

+36
-16
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "git-sym-test"]
2+
path = git-sym-test
3+
url = https://github.com/cdunn2001/git-sym-test

README.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,20 @@ The purpose is to separate big-file caching from revision-control. There are sev
99
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.
1010

1111
## 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:
1314
```
1415
ln -sf `pwd`/git_sym.py ~/bin/git-sym
1516
```
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:
2818
```
29-
git-sym update
19+
python git_sym.py -h
3020
```
3121

32-
An example will clarify this. (For more detailed examples see
33-
<https://github.com/cdunn2001/git-sym-test>.)
22+
## Examples
23+
These examples explain the basics:
24+
25+
* <https://github.com/cdunn2001/git-sym-test/wiki/Examples>
3426

3527
## Running
3628
You can test it right here. The `links` directory has some examples.
@@ -54,6 +46,22 @@ git-sym update links/foo
5446
# python git_sym.py update links/foo
5547
cat links/foo
5648
```
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+
5765
## Breaking the link
5866
To break it, remove the file from the cache and from its
5967
origin.
@@ -122,6 +130,14 @@ We use that to learn the actual location of the `.git/` directory. If it fails,
122130

123131
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.
124132

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+
125141
### .gitignore
126142
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.
127143

git-sym-test

Submodule git-sym-test added at 6d51c6f

0 commit comments

Comments
 (0)