Permalink
Browse files

Update documentation

  • Loading branch information...
1 parent 693c895 commit 30828f925dd24d7b94d3adbce3971049edfa7665 David Rorex committed Jul 2, 2010
Showing with 58 additions and 19 deletions.
  1. +47 −9 README.rdoc
  2. +2 −2 lib/git-media/transport/local.rb
  3. +4 −5 lib/git-media/transport/s3.rb
  4. +5 −3 lib/git-media/transport/scp.rb
View
@@ -3,23 +3,52 @@
GitMedia extension allows you to use Git with large media files
without storing the media in Git itself.
-== Usage
+== Configuration
-Setup the alias and attributes filter settings.
+Setup the attributes filter settings.
(once after install)
- $ git-media setup (media)
+ $ git config filter.media.clean "git-media filter-clean"
+ $ git config filter.media.smudge "git-media filter-smudge"
Setup the .gitattributes file to map extensions to the filter.
(in repo - once)
- $ git media attributes (full/movies) > .gitattributes
+ $ echo "*.mov filter=media" > .gitattributes
Staging files with those extensions will automatically copy them to the
media buffer area (.git/media) until you run 'git media sync' wherein they
are uploaded. Checkouts that reference media you don't have yet will try to
be automatically downloaded, otherwise they are downloaded when you sync.
+Next you need to configure git to tell it where you want to store the large files.
+There are three options:
+
+1. Storing remotely in Amazon's S3
+2. Storing locally in a filesystem path
+3. Storing remotely via SCP (should work with any SSH server)
+
+Here are the relevant sections that should go either in ~/.gitconfig (for global settings)
+or in clone/.git/config (for per-repo settings).
+
+ [git-media]
+ transport = <scp|local|s3>
+
+ # settings for scp transport
+ scpuser=<user>
+ scphost=<host>
+ scppath=<path_on_remote_server>
+
+ # settings for local transport
+ path=<local_filesystem_path>
+
+ # settings for s3 transport
+ s3bucket=<name_of_bucket>
+ s3key=<s3 access key>
+ s3secret=<s3 secret key>
+
+== Usage
+
(in repo - repeatedly)
$ (hack, stage, commit)
$ git media sync
@@ -29,20 +58,29 @@ You can also check the status of your media files via
$ git media status
Which will show you files that are waiting to be uploaded and how much data
-that is, data in your buffer that you can purge (already uploaded)
+that is. If you want to upload & delete the local cache of media files, run:
- $ git media purge (--old)
- $ git media purge --all
+ $ git media clear
== Config Settings
$ git config --global media.auto-download false
-== Install
+== Installing
$ sudo gem install trollop
- $ sudo gem install schacon-git-media --source=http://gems.github.com
+ $ sudo gem install s3
+ $ sudo gem install right_aws
+ $ gem build git-media.gemspec
+ $ sudo gem install git-media-0.1.1.gem
+
+== Notes for Windows
+If installing on windows, you might run into a problem verifying certificates
+for S3 or something. If that happens, modify
+ C:\Ruby191\lib\ruby\gems\1.9.1\gems\right_http_connection-1.2.4\lib\right_http_connection.rb
+And add at line 310, right before "@http.start":
+ @http.verify_mode = OpenSSL::SSL::VERIFY_NONE
== Copyright
@@ -2,8 +2,8 @@
# move large media to local bin
-# media.transport local
-# media.local.path /opt/media
+# git-media.transport local
+# git-media.localpath /opt/media
module GitMedia
module Transport
@@ -1,11 +1,10 @@
require 'git-media/transport'
require 'right_aws'
-# media.transport s3
-# media.s3.bucket
-# media.s3.access_key_id
-# media.s3.secret_access_key
-# media.s3.log
+# git-media.transport s3
+# git-media.s3bucket
+# git-media.s3key
+# git-media.s3secret
module GitMedia
module Transport
@@ -1,9 +1,11 @@
require 'git-media/transport'
-# move large media to local bin
+# move large media to remote server via SCP
-# media.transport local
-# media.local.path /opt/media
+# git-media.transport scp
+# git-media.scpuser someuser
+# git-media.scphost remoteserver.com
+# git-media.scppath /opt/media
module GitMedia
module Transport

0 comments on commit 30828f9

Please sign in to comment.