[Feature] LFS support for Migrate and Mirror #4706

Closed
opened 2025-11-02 06:00:17 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @6543 on GitHub (Jan 22, 2020).

as title

Originally created by @6543 on GitHub (Jan 22, 2020). as title
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 06:00:17 -06:00
Author
Owner

@6543 commented on GitHub (Feb 14, 2021):

# create a bare clone of the GitHub repository
git clone --bare git@github.com:repo_owner/repo_name.git
cd repo_name

# set up named remotes for Gitea and GitHub
git remote add gitea git@gitea.org:tpettersen/repo_name.git
git remote add github git@github.com:repo_owner/repo_name.git

# fetch all Git LFS content from GitHub
git lfs fetch --all github

# push all Git and Git LFS content to Gitea
git push --mirror gitea $ git lfs push --all gitea
@6543 commented on GitHub (Feb 14, 2021): ```sh # create a bare clone of the GitHub repository git clone --bare git@github.com:repo_owner/repo_name.git cd repo_name # set up named remotes for Gitea and GitHub git remote add gitea git@gitea.org:tpettersen/repo_name.git git remote add github git@github.com:repo_owner/repo_name.git # fetch all Git LFS content from GitHub git lfs fetch --all github # push all Git and Git LFS content to Gitea git push --mirror gitea $ git lfs push --all gitea ```
Author
Owner

@zeripath commented on GitHub (Feb 14, 2021):

this would require git lfs to be installed with gitea or that we implement a git lfs client (which potentially wouldn't be too difficult)

BTW we can't do:

# fetch all Git LFS content from GitHub
git lfs fetch --all github

# push all Git and Git LFS content to Gitea
git push --mirror gitea $ git lfs push --all gitea

we have to have the fetch deposit the assets directly into gitea's lfs store as soon as an LFS file is obtained.

@zeripath commented on GitHub (Feb 14, 2021): this would require git lfs to be installed with gitea or that we implement a git lfs client (which potentially wouldn't be too difficult) BTW we can't do: ``` # fetch all Git LFS content from GitHub git lfs fetch --all github # push all Git and Git LFS content to Gitea git push --mirror gitea $ git lfs push --all gitea ``` we have to have the fetch deposit the assets directly into gitea's lfs store as soon as an LFS file is obtained.
Author
Owner

@6543 commented on GitHub (Feb 14, 2021):

isnt git-lfs implemented in go?

I think we need a own client to store things into our lfs directly

@6543 commented on GitHub (Feb 14, 2021): isnt git-lfs implemented in go? I think we need a own client to store things into our lfs directly
Author
Owner

@KN4CK3R commented on GitHub (Apr 29, 2021):

This issue can be closed with #14726 and #15157 I guess?

@KN4CK3R commented on GitHub (Apr 29, 2021): This issue can be closed with #14726 and #15157 I guess?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4706