Skip to content

A GitHub CLI extension that will migrate a repo to LFS

License

Notifications You must be signed in to change notification settings

robandpdx/gh-lfser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-lfser

This GitHub CLI extension will migrate a repo to LFS. WARNING: This is destructive!! I recommend you test this operation on a fork first! The repo pull requests will be outdated after this operation because the commit shas will change as a result of the history being rewritten.

This will:

  1. Clone the repo
  2. Migrate files with the provided extension to LFS
  3. Commit lfs-mapping.csv file on default branch showing old sha to new sha mapping
  4. Force push all repo branches back to the origin
  5. Forge push all tags

Permissions

You need write access to the repo. The repo needs to allow force pushes to all branches. It's probably best to disable any branch protection rules that may be in place before running this.

Install

gh extension install robandpdx/gh-lfser

Upgrade

gh extension upgrade robandpdx/gh-lfser

Usage

gh lfser --extensions <extensions> --repo <repo>
gh lfser --help

Example

gh lfser --extensions "*.dmg,*.png,*.jpg" --repo robandpdx/el-repo-mas-grande

About

A GitHub CLI extension that will migrate a repo to LFS

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages