The SHAs are different, they NEED to be pulled down. What I'd imagine the sha would be VERY bad (if it were even possible). Perhaps a smart filter script could do this, but I don't have one. The PERFECT solution would probably be something that could line up each sha from the submodules and basically shuffle the commits together. This also requires you to continue hosting the submodule repos You'll have to re-init the submodules and submodule update each time, and it'll probably break requiring you to manually help submodule each time, but it is doable. commits, it'll re-checkout the submodule version. Just remove the submodule in your current commit, and then add all the files back tracking git lfs files.commits point to won't be lined up with the new S* commits. This means that the versions of the submodule the M 1. Where M are your main repo commits, and S are submodule commits. Git ls-files | xargs git check-attr filter | grep "filter: lfs" | sed -r "s/(.*): filter: lfs/\1/" > $ This is when all the large files are sent to the lfs server.Įxport KEEP_FILE="$(git rev-parse -show-toplevel)/.git/.keep" Make sure no one else pushes or references the commits you just rebased, or else you will have a mess. Push changes to whatever remote or remotes you have, of course you have to use the -f option, which can (and WILL!) have many implications to all the other users using the repo.IF you have them at the same url, you can skip that step gitconfig files and git config lines are so that if you have an lfs server in a separate location than the git repo, everything works. Hopefully you can use the SAME set of rules for EVERY commit I just added track *.npy as an example, but add all of your track commands in there.You have to use tree-filter here, and not index-filter because we are adding objects back. Git filter-branch -prune-empty -tree-filter 'įor file in $(git ls-files | xargs git check-attr filter | grep "filter: lfs" | sed -r "s/(.*): filter: lfs/\1/") do
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |