alebedev / git-media Goto Github PK
View Code? Open in Web Editor NEWHandling large media files in Git
License: MIT License
Handling large media files in Git
License: MIT License
On Windows, media files are stored with CRLF but checked out with LF.
Repro steps:
.gitattributes
: *.png filter=media -crlfpng
file in the repogit media sync
git checkout HEAD~
(as expected, the png file is removed)git checkout master
(or whatever commit originally added the media file)git status
At this point, the png
file has been checked back out, but git media claims that it has been modified, and in fact it has.
The file stored by git media matches the original file, but the one that has appeared in the repo after checking out does not match, as it appears to have UNIX-style line endings.
Running dos2unix
on the original file will cause it to match the file that appeared after checkout in the repo.
I have created a script that will repro this on Windows (run from git bash). The same script works fine on Linux.
I am testing with local
transport.
I have tried all 3 versions of core.autocrlf
(true
, false
, input
) to no avail.On Windows, media files are stored with CRLF but checked out with LF.
Repro steps:
.gitattributes
: *.png filter=media -crlfpng
file in the repogit media sync
git checkout HEAD~
(as expected, the png file is removed)git checkout master
(or whatever commit originally added the media file)git status
At this point, the png
file has been checked back out, but git media claims that it has been modified, and in fact it has.
The file stored by git media matches the original file, but the one that has appeared in the repo after checking out does not match, as it appears to have UNIX-style line endings.
Running dos2unix
on the original file will cause it to match the file that appeared after checkout in the repo.
I have created a script that will repro this on Windows (run from git bash). The same script works fine on Linux.
I am testing with local
transport.
I have tried all 3 versions of core.autocrlf
(true
, false
, input
) to no avail.
it's irksome to have 2 repos do the same thing. Seems like @vitei has a few changes that might be useful.
I get the warning multiple times in each execution. Could upgrade to new versions of digest please?
Hey,
I'm using a localpath with git-media.
Adding media files works fine but when I make changes to the media files they won't get uploaded to the localpath.
I tried the commands sync
clear
and update-index --really-refresh
.
update-index --really-refresh
also prints test1.jpg: needs update
(this is the file i changed) but no matter what i do it does not upload the new version to the localpath.
From the announcement page:
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
I think it would make sense to add GitHub's LFS service to the list of supported storage options.
Here's the developer API, in case you wanted to take a look. I'm part of the GitHub Developer program so if I can help in any way let me know.
When I run git media sync, I get something like this:
$ git media sync
uploading 6e77b6c6
But I don't see how much size is uploaded already or percent or even a ETA. Could you implement this feature for S3 uploads or others?
I was following the install instruction but ran into a problem on the first step.
Could anyone explain what I need to do to resolve this?
$ git clone [email protected]:alebedev/git-media.git
Cloning into 'git-media'...
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Say, I want to have a read only git-media repository where I can pull updates from others, and have a writeable git-media repository where I put my own changes from which others can pull.
During the bundle install
step:
Retrying git fetch --force --quiet --tags "/home/notklaatu/.bundle/ \
cache/git/net_dav-cfd3539cb697ebad3b54ee22c85d520206c52405" \
due to error (3/4): Bundler::Source::Git::GitCommandError Git error: \
command `git fetch --force --quiet --tags "/home/notklaatu/.bundle/ \
cache/git/net_dav-cfd3539cb697ebad3b54ee22c85d520206c52405"` \
in directory /var/lib/gems/2.1.0/bundler/gems/net_dav-615797fa55a7 has failed.
If this error persists you could try removing the cache directory
'/home/notklaatu/.bundle/cache/git/ \
net_dav-cfd3539cb697ebad3b54ee22c85d520206c52405' \
error: cannot open .git/FETCH_HEAD: Permission denied
Removing the net-dav line from the Gemfile and installing net-dav manually succeeds.
is it possible to include git media sync into git push? is there a hook or something? git-lfs doesn't have this second step, but not sure how desirable this would be
After installing per the directions of the README I get the following exception when I run git media status
WARN: Unresolved specs during Gem::Specification.reset:
trollop (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/cameroncraig/.rvm/gems/ruby-2.2.2@global/gems/git-media-0.1.5/lib/git-media.rb:4:in `require': cannot load such file -- trollop (LoadError)
I've tried installing and uninstalling multiple times, all the gems install and build correctly when I go through the install process so I'm not sure what's going on
Amazon Cloud provides free unlimited photo storage with their Prime membership.
Hi,
Is there any chance to get version 0.1.5 pushed to rubygems?
I'd simplify our CI setup a lot.
I installed git-media on Windows 10 and it works using a local folder for git media sync
. However; I am unable to switch branches. Git complains about git-media synced files being not committed.
git checkout master -f
error: Entry 'path/to/git-media-synced-file.wav' not uptodate. Cannot merge.
However, git status
says
On branch branchname
Your branch is up-to-date with 'origin/branchname'.
nothing to commit, working directory clean
I started using git-media on branchname
. Should I have started using git-media on branch master? I also cannot merge branchname with any other branch. What can I do now to get git working again?
i want to manage backups of large sets of image and video files without replicating files and using storage space unnecessarily. I saw this project and it just might be what i need. could you please confirm that changed files will be detected and only those changed files will be committed. thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.