git-lfs-migrate | Simple project for convert old repository
kandi X-RAY | git-lfs-migrate Summary
kandi X-RAY | git-lfs-migrate Summary
Simple project for convert old repository for using git-lfs feature.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main entry point
- Performs basic processing of all objects in source repositories
- Creates a task which converts the contents of a tree to a file
- Process a single repository
- Converts an array of strings to a matcher
- Split a path
- Removes backslashes
- Normalize pattern parts
- Creates a hashCode of this task
- Returns a hashCode of this object
- Compares two GitTreeEntry for equality
- Compares this object with the specified key
- Compares two complex matchers
- Compares this object for equality
- Returns a child path matcher
- Returns a unique hashCode of the nameMatcher instance
- Compares this object to another
- Compare this node to another file
- Returns a unique hashCode of the suffix
git-lfs-migrate Key Features
git-lfs-migrate Examples and Code Snippets
Community Discussions
Trending Discussions on git-lfs-migrate
QUESTION
I have a git repository (a Godot game project using GDScript) that I've been working on for quite a while and has about a thousand commits, pushed to GitHub.
I'm to start adding binary assets like image or sound files with Git LFS.
Looking at the git-lfs-migrate
docs I should probably migrate the local history to have some already existing png files converted too. Now, this looks like a significant change and I don't insist on shooting myself in the foot, so I'd like to know what is the best practice for this type of repository migration.
I'm the only one working on this repository so even sacrileges like force pushing is acceptable to me, as long as I don't lose my code and can convert my large files.
Clarification: Primarily I'm unsure about the possible consequences of migrating the local history or going without rewriting local history. Not sure what's the pros and cons are for these choices.
The reason why I'm considering Git LFS is that so far I've only been editing text files, but now I'm about to add a number of large binaries (images, sounds, data files), which will change during development, so not using LFS would be a waste. Ideally I'd only like to download the latest binaries when I'm cloning the repository to my various test environments.
...ANSWER
Answered 2022-Mar-27 at 09:55Finally I did not migrate anything, just installed git-lfs, then pushed the changes to the remote repository on GitHub. When I cloned the repository on my 2 other computers (a Linux and a Mac), not forgetting to install git-lfs there too, on both cases I received a weird error, complaining about "smudge filter lfs failed".
This SO answer was the solution: https://stackoverflow.com/a/48882513/63377
Essentially LFS didn't have a URL set and it was too timid to tell me. I had to run git config lfs.url $(git config remote.WHATEVER-MY-LFS-REMOTE-NAME-IS.url)
, then do another git pull
, and it all seems to be working.
QUESTION
I was using git lfs for some large files as I had committed prior to use it, so I had to use git lfs migrate import
as provided here which re-wrote the commits and then I was able to push it on the server. But, in turn, it has changed whole project's every .kt, .xml file to these 3 lines:
ANSWER
Answered 2021-Apr-17 at 21:20I've solved the issue which was new for me. It might help others.
So, What I wanted to do was to support large files, I used git lfs
but as I had already committed the code, I had to use git lfs migrate import
which edits already committed changes and add the "supposedly" big files to its repository capable to store large files.
But, this command added all the files and provided a pointer as mentioned in the comments by Torek.
I read their help docs and to resolve the issue, first I ran a command git lfs checkout
which brings back the original content of the files from the repo to local files and then I removed all type of files added to .gitattributes
except few for which I used git lfs
on the first place. git lfs
works with .gitattributes
.
Then, I just did a new commit and push and everything works fine now. Hell of a journey at midnight, blew my sleep.
QUESTION
Git lfs documentation says :
...ANSWER
Answered 2020-Jul-17 at 20:44git lfs migrate
does not call git lfs install
. You need to run git lfs install
once per user and machine pair unless you have set up the filters appropriately by hand.
The command installs the filter commands which invoke Git LFS into the user's ~/.gitconfig
file and the hooks in the present repository. Those hooks are also installed when certain Git LFS commands are invoked in a repository for the first time, but that will only happen if git lfs install
has been run or the filters have been appropriately configured.
Besides installing the hooks, the git lfs install
command runs the following:
QUESTION
Trying to migrate a repo (including history) OUT of Git LFS.
I ran git lfs migrate export --include="*" --everything
(mentioned here) on a test repo, but it didn't work as expected and left LFS pointer files instead of converting them all to objects.
I tried alternative methods, following this. Unfortunately it still left pointer files, so I combined it with this.
In the end, I even ran all the commands together:
...ANSWER
Answered 2020-Jan-04 at 08:31Do a
git lfs migrate export --everything --include .
to replace all the LFS pointers by the real files in the git history. For more details, see http://stackoverflow.com/a/57681990/717372Run
git lfs uninstall
to remove lfs hooks.And verify that the
.gitattributes
has the lfs filters removed.If the lfs filters were not removed, and if
.gitattributes
was only needed for LFS, delete the file in all of history with:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-lfs-migrate
Install Java 1.8 or later
Download binaries archive from: https://github.com/bozaro/git-lfs-migrate/releases/latest
After unpacking archive you can run server executing: java -jar build/deploy/git-lfs-migrate.jar -s source-repo.git -d target-repo.git -l http://test:test@lfs-server/ "*.psd" "*.zip" "*.bin"
New repository bozaro/git-lfs-migrate-converted
All *.md and *.jar in this repository will stored in LFS storage
All revisions on this repository will have modified or created .gitattributes file with new lines like:
https://user:passw0rd@github.com/foo/bar.git
http://user:passw0rd@github.com/foo/bar.git
git://user:passw0rd@github.com/foo/bar.git
ssh://git@github.com/foo/bar.git
git@github.com:foo/bar.git
To build from sources you need install JDK 1.8 or later and run build script.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page