73 lines
1.9 KiB
Markdown
73 lines
1.9 KiB
Markdown
git-lfs-migrate(1) - Migrate history to or from git-lfs
|
|
=======================================================
|
|
|
|
## SYNOPSIS
|
|
|
|
`git lfs migrate` <mode> [options] [--] [branch ...]
|
|
|
|
## MODES
|
|
|
|
* `info`
|
|
Perform no migration, instead show information about repository size.
|
|
|
|
## OPTIONS
|
|
|
|
* `-I` <paths> `--include=`<paths>:
|
|
See [INCLUDE AND EXCLUDE].
|
|
|
|
* `-X` <paths> `--exclude=`<paths>:
|
|
See [INCLUDE AND EXCLUDE].
|
|
|
|
* `--include-ref`=<refname>:
|
|
See [INCLUDE AND EXCLUDE (REFS)].
|
|
|
|
* `--exclude-ref`=<refname>:
|
|
See [INCLUDE AND EXCLUDE (REFS)].
|
|
|
|
* [branch ...]:
|
|
Migrate only the set of branches listed. If not given, `git-lfs-migrate(1)`
|
|
will the currently checked out branch.
|
|
|
|
If any of `--include-ref` or `--exclude-ref` are given, the checked out
|
|
branch will not be appended, but branches given explicitly will be appended.
|
|
|
|
## INCLUDE AND EXCLUDE
|
|
|
|
You can configure Git LFS to only migrate tree entries whose pathspec matches
|
|
the include glob and does not match the exclude glob, to reduce total migration
|
|
time or to only migrate part of your repo.
|
|
|
|
Pattern matching is done as given to be functionally equivalent to pattern
|
|
matching as in .gitattributes.
|
|
|
|
## INCLUDE AND EXCLUDE (REFS)
|
|
|
|
You can configure Git LFS to only migrate commits reachable by references
|
|
include by `--include-ref` and not reachable by `--exclude-ref`.
|
|
|
|
D---E---F
|
|
/ \
|
|
A---B------C refs/heads/my-feature
|
|
\ \
|
|
\ refs/heads/master
|
|
\
|
|
refs/remotes/origin/master
|
|
|
|
In the above configuration, the following commits are reachable by each ref:
|
|
|
|
refs/heads/master: C, B, A
|
|
refs/heads/my-feature: F, E, D, B, A
|
|
refs/remote/origin/master: A
|
|
|
|
The following configuration:
|
|
|
|
--include-ref=refs/heads/my-feature
|
|
--include-ref=refs/heads/master
|
|
--exclude-ref=refs/remotes/origin/master
|
|
|
|
Would, therefore, include commits: F, E, D, C, B, but exclude commit A.
|
|
|
|
## SEE ALSO
|
|
|
|
Part of the git-lfs(1) suite.
|