When using git-svn and dcommiting binary files (images and JAR files) there is one difference: Images are treated as binary in SVN too if they are initally committed via SVN. Neither JAR files nor new images added to git then dcommitted to SVN does have any Svn Property like svn:mime-type.
This causes, repository viewer like Fisheye will handle these files as text-files and will create non-sense changeset diffs for them.. I expect there will be other problems on merging too.
Is there a simple but user friendly way to automatically set the correct mime-type for correct binary file handling?
I know, i know, there will be users who will say: WHY DO YOU TRACK JAR files in SVN? USe Nexus and Maven....YES, You're right, but JAR files are just one of the examples. The main problems relates to images!
If Subversion determines that the file is binary, the file receives an svn:mime-type property set to application/octet-stream. You can always override this by using the auto-props feature or by setting the property manually with svn propset . Subversion treats the following files as text: Files with no svn:mime-type.
Git LFS is a Git extension used to manage large files and binary files in a separate Git repository. Most projects today have both code and binary assets. And storing large binary files in Git repositories can be a bottleneck for Git users.
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
You can checkout a git repository but you can't do most of other operations. You can setup tortoise git which provides same interface for Git although the commands are different.
Looks like you can set an [auto-props] in your subversion config that git will pick up on. Go to http://trac.webkit.org/wiki/UsingGitWithWebKit and look at the section titled Misc. Tips and Tricks
Looks like you can add something like:
[miscellany]
enable-auto-props = yes
# Add an additonal line for each type of binary file you wish to commit.
[auto-props]
*.jpg = svn:mime-type=image/jpeg
to your ~/.subversion/config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With