GithubHelp home page GithubHelp logo

pong121021 / git-lfs-migrate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bozaro/git-lfs-migrate

0.0 2.0 0.0 215 KB

Simple project for convert old repository for using git-lfs feature

License: MIT License

Java 100.00%

git-lfs-migrate's Introduction

Overview

Build Status

Simple project for convert old repository for using git-lfs feature.

How to use

Run from binaries

For quick run you need:

  • 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"

For example, you can convert bozaro/git-lfs-migrate to bozaro/git-lfs-migrate-converted by commands:

#!/bin/bash
# Clone original repository
git clone --mirror [email protected]:bozaro/git-lfs-migrate.git

# Convert repository with moving .md and .jar file to LFS
#
# Usage: <main class> [options] LFS file glob patterns
#   Options:
#     -c, --cache
#        Source repository
#        Default: .
#         --check-lfs
#      Check LFS server settings and exit
#      Default: false
#   * -d, --destination
#        Destination repository
#     -g, --git
#       GIT repository url (ignored with --lfs parameter)
#     -h, --help
#        Show help
#        Default: false
#     -l, --lfs
#        LFS server url (can be determinated by --git paramter)
#   * -s, --source
#        Source repository
#     -u, --upload-threads
#        HTTP upload thread count
#        Default: 4
#     -t, --write-threads
#        IO thread count
#        Default: 2
#     --glob-file
#        File containing glob patterns
java -jar git-lfs-migrate.jar \
     -s git-lfs-migrate.git \
     -d git-lfs-migrate-converted.git \
     -g [email protected]:bozaro/git-lfs-migrate-converted.git \
     "*.md" \
     "*.jar"

# Push coverted repository to new repository
cd git-lfs-migrate-converted.git
git fsck && git push --mirror [email protected]:bozaro/git-lfs-migrate-converted.git

After that you with have:

  • 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:
*.md    filter=lfs diff=lfs merge=lfs -text
*.jar   filter=lfs diff=lfs merge=lfs -text

Supported Git url formats:

Build from sources

To build from sources you need install JDK 1.8 or later and run build script.

For Linux:

./gradlew deployZip

For Windows:

call gradlew.bat deployZip

When build completes you can convert repository 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"

git-lfs-migrate's People

Contributors

bozaro avatar robinst avatar brad avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.