Skip to content

Commit

Permalink
updates docs for 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github_CI authored and github_CI committed Dec 25, 2020
1 parent e64da68 commit 77e16e3
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 109 deletions.
33 changes: 16 additions & 17 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `mgt`

> this file was automatically generated on 2020-11-01
> this file was automatically generated on 2020-12-25
Below you'll find a list of links to documentation pages, as well as the
automatically generated output of `mgt --help`
Expand All @@ -19,26 +19,25 @@ automatically generated output of `mgt --help`
## `mgt help`

```
mgt 3.0.0 e211271
mgt 4.0.0 e64da68
Nikita Skobov
Git tools that enable easy bidirectional sync between multiple repositories
USAGE:
mgt [SUBCOMMAND]
mgt [SUBCOMMAND] [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
check check if remote has commits not present in local or vice versa
help Prints this message or the help of the given subcommand(s)
split-in fetch and rewrite a remote repository's history onto a new branch such that it only contains
certain paths according to a repo-file
split-in-as fetch the entirety of a remote repository and place it in a subdirectory of this repository
split-out rewrite this repository history onto a new branch such that it only contains certain paths
according to a repo-file
split-out-as make a new repository (via a branch) that only contains commits that are part of a subdirectory
topbase rebases top branch onto bottom branch keeping only the first commits until it finds a commit
from top where all blobs exist in the bottom branch.
--dry-run Dont run anything. Just print output of what a run would do.
--verbose More detailed output
-h, --help Prints help information
-V, --version Prints version information
Available commands:
help
check check if there are changes ready to be pushed or pulled
topbase rebase top branch onto bottom branch but stop the rebase after the first shared commit
split-in fetch and rewrite a remote repository's history onto a new branch according to the repo file rules
split-in-as fetch and rewrite a remote repository's history onto a new branch and into the --as <subdirectory>
split-out create a new branch with this repository's history rewritten according to the repo file rules
split-out-as create a new branch with this repository's history rewritten according to the --as <subdirectory>
```
29 changes: 15 additions & 14 deletions doc/check.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# `mgt check --help`

```
mgt-check
check if remote has commits not present in local or vice versa
check if there are changes ready to be pushed or pulled
USAGE:
mgt check [FLAGS] [OPTIONS] <repo-file>
mgt check [FLAGS] [OPTIONS] <repo_file>
FLAGS:
-a, --all if the <repo-file> is a directory, by default mgt only looks for files ending in .rf, with the
--all flag, you are telling mgt to get any file it finds from the <repo-file> directory
-h, --help Prints help information
-l, --local check if the local branch has commits not present in remote
-r, --recursive if the <repo-file> is a directory, get all files in this directory recursively
-m, --remote check if the remote has commits not present in this local branch. This is the default
-V, --version Prints version information
--all if the <repo-file> is a directory, by default mgt only looks for files ending
in .rf, but with the --all flag, you are telling mgt to get any file it finds
from the <repo-file> directory
--local check if the local branch has commits not present in remote
--recursive if the <repo-file> is a directory, get all files in this directory recursively
--remote check if the remote has commits not present in this local branch. This is the
default
--help
OPTIONS:
--local-branch <local-branch> check updates to/from a specific local branch instead of the current HEAD
-b, --remote-branch <remote-branch> check updates to/from a specific remote branch instead of what's in the repo
file
--local-branch BRANCH-NAME check updates to/from a specific local branch instead of
the current HEAD
-b, --remote-branch BRANCH-NAME check updates to/from a specific remote branch instead of
what's in the repo file
ARGS:
POSITIONAL:
<repo-file> path to file that contains instructions of how to split a repository
```
49 changes: 27 additions & 22 deletions doc/split-in-as.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
# `mgt split-in-as --help`

```
mgt-split-in-as
fetch the entirety of a remote repository and place it in a subdirectory of this repository
fetch and rewrite a remote repository's history onto a new branch and into the --as <subdirectory>
USAGE:
mgt split-in-as [FLAGS] [OPTIONS] <git-repo-uri> --as <subdirectory>
FLAGS:
-d, --dry-run Print out the steps taken, but don't actually run or change anything.
-g, --gen-repo-file generate a repo file from the provided remote repo and the --as argument gets mapped to
[include_as]
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose show more detailed logs
-g, --gen-repo-file generate a repo file from the provided remote repo and the --as
argument gets mapped to [include_as]
--verbose Prints verbose information
--dry-run Print out the steps taken, but don't actually run or change anything.
--help
-r after generating a branch with rewritten history, rebase that branch
such that it can be fast forwarded back into the comparison branch. for
split-in that is the branch you started on. For split-out, that is the
remote branch
-t like rebase, but it finds a fork point by stopping at the first commit
that two branches have in common. This is useful as an 'update'
mechanism.
OPTIONS:
--as <subdirectory> path relative to root of the local repository that will contain the entire
repository being split
--num-commits <n> when pulling from remote, limit to n commits from the current tip. This is
probably only useful the first time you do a split-in
-o, --output-branch <branch-name> name of branch that will be created with new split history
-r, --rebase <rebase> after generating a branch with rewritten history, rebase that branch such that
it can be fast forwarded back into the comparison branch. For split-in, the
comparison branch is the branch you started on. For split-out, the comparison
branch is the remote branch. By specifying a value for <rebase>, you can use a
specific remote branch and override what is in your repo file. [default: ]
-t, --topbase <topbase> like rebase, but it finds a fork point to only take the top commits from the
created branch that dont exist in your starting branch. Optionally pass in the
name of a remote branch to override what is in your repo file.
--num-commits N when pulling from remote, limit to N commits from the
current tip. This is probably only useful the first time
you do a split-in
-o, --output-branch OUTPUT-BRANCH name of branch that will be created with new split
history
--rebase BRANCH-NAME like the -r flag, but you can specify the name of the
branch you want to use as the comparison branch instead
of using the default
--topbase BRANCH-NAME like the -t flag, but you can specify the name of the
remote branch that will be used instead of what is
defined in your repo file
--as AS-SUBDIR path relative to root of the local repository that will
contain the entire repository being split
ARGS:
POSITIONAL:
<git-repo-uri> a valid git url of the repository to split in
```
46 changes: 25 additions & 21 deletions doc/split-in.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
# `mgt split-in --help`

```
mgt-split-in
fetch and rewrite a remote repository's history onto a new branch such that it only contains certain paths according to
a repo-file
fetch and rewrite a remote repository's history onto a new branch according to the repo file rules
USAGE:
mgt split-in [FLAGS] [OPTIONS] <repo-file>
mgt split-in [FLAGS] [OPTIONS] <repo_file>
FLAGS:
-d, --dry-run Print out the steps taken, but don't actually run or change anything.
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose show more detailed logs
--verbose Prints verbose information
--dry-run Print out the steps taken, but don't actually run or change anything.
--help
-r after generating a branch with rewritten history, rebase that branch
such that it can be fast forwarded back into the comparison branch. for
split-in that is the branch you started on. For split-out, that is the
remote branch
-t like rebase, but it finds a fork point by stopping at the first commit
that two branches have in common. This is useful as an 'update'
mechanism.
OPTIONS:
--input-branch <branch-name> split in from a local branch in this repository
--num-commits <n> when pulling from remote, limit to n commits from the current tip. This is
probably only useful the first time you do a split-in
-o, --output-branch <branch-name> name of branch that will be created with new split history
-r, --rebase <rebase> after generating a branch with rewritten history, rebase that branch such that
it can be fast forwarded back into the comparison branch. For split-in, the
comparison branch is the branch you started on. For split-out, the comparison
branch is the remote branch. By specifying a value for <rebase>, you can use a
specific remote branch and override what is in your repo file.
-t, --topbase <topbase> like rebase, but it finds a fork point to only take the top commits from the
created branch that dont exist in your starting branch. Optionally pass in the
name of a remote branch to override what is in your repo file.
--input-branch INPUT-BRANCH split in from a local branch in this repository
--num-commits N when pulling from remote, limit to N commits from the
current tip. This is probably only useful the first time
you do a split-in
-o, --output-branch OUTPUT-BRANCH name of branch that will be created with new split
history
--rebase BRANCH-NAME like the -r flag, but you can specify the name of the
branch you want to use as the comparison branch instead
of using the default
--topbase BRANCH-NAME like the -t flag, but you can specify the name of the
remote branch that will be used instead of what is
defined in your repo file
ARGS:
POSITIONAL:
<repo-file> path to file that contains instructions of how to split a repository
```
25 changes: 16 additions & 9 deletions doc/split-out-as.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# `mgt split-out-as --help`

```
mgt-split-out-as
make a new repository (via a branch) that only contains commits that are part of a subdirectory
create a new branch with this repository's history rewritten according to the --as <subdirectory>
USAGE:
mgt split-out-as [FLAGS] --as <subdirectory> --output-branch <branch-name>
FLAGS:
-d, --dry-run Print out the steps taken, but don't actually run or change anything.
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose show more detailed logs
--verbose Prints verbose information
--dry-run Print out the steps taken, but don't actually run or change anything.
--help
-r after generating a branch with rewritten history, rebase that branch
such that it can be fast forwarded back into the comparison branch. for
split-in that is the branch you started on. For split-out, that is the
remote branch
-t like rebase, but it finds a fork point by stopping at the first commit
that two branches have in common. This is useful as an 'update'
mechanism.
OPTIONS:
--as <subdirectory> path relative to root of the local repository that will contain the entire
repository being split
-o, --output-branch <branch-name> name of branch that will be created with new split history
-o, --output-branch OUTPUT-BRANCH name of branch that will be created with new split
history
--as AS-SUBDIR path relative to root of the local repository that will
contain the entire repository being split
```
38 changes: 21 additions & 17 deletions doc/split-out.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# `mgt split-out --help`

```
mgt-split-out
rewrite this repository history onto a new branch such that it only contains certain paths according to a repo-file
create a new branch with this repository's history rewritten according to the repo file rules
USAGE:
mgt split-out [FLAGS] [OPTIONS] <repo-file>
mgt split-out [FLAGS] [OPTIONS] <repo_file>
FLAGS:
-d, --dry-run Print out the steps taken, but don't actually run or change anything.
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose show more detailed logs
--verbose Prints verbose information
--dry-run Print out the steps taken, but don't actually run or change anything.
--help
-r after generating a branch with rewritten history, rebase that branch
such that it can be fast forwarded back into the comparison branch. for
split-in that is the branch you started on. For split-out, that is the
remote branch
-t like rebase, but it finds a fork point by stopping at the first commit
that two branches have in common. This is useful as an 'update'
mechanism.
OPTIONS:
-o, --output-branch <branch-name> name of branch that will be created with new split history
-r, --rebase <rebase> after generating a branch with rewritten history, rebase that branch such that
it can be fast forwarded back into the comparison branch. For split-in, the
comparison branch is the branch you started on. For split-out, the comparison
branch is the remote branch. By specifying a value for <rebase>, you can use a
specific remote branch and override what is in your repo file.
-t, --topbase <topbase> like rebase, but it finds a fork point to only take the top commits from the
created branch that dont exist in your starting branch. Optionally pass in the
name of a remote branch to override what is in your repo file.
-o, --output-branch OUTPUT-BRANCH name of branch that will be created with new split
history
--rebase BRANCH-NAME like the -r flag, but you can specify the name of the
branch you want to use as the comparison branch instead
of using the default
--topbase BRANCH-NAME like the -t flag, but you can specify the name of the
remote branch that will be used instead of what is
defined in your repo file
ARGS:
POSITIONAL:
<repo-file> path to file that contains instructions of how to split a repository
```
15 changes: 6 additions & 9 deletions doc/topbase.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# `mgt topbase --help`

```
mgt-topbase
rebases top branch onto bottom branch keeping only the first commits until it finds a commit from top where all blobs
exist in the bottom branch.
rebase top branch onto bottom branch but stop the rebase after the first shared commit
USAGE:
mgt topbase [FLAGS] <base> [top]
FLAGS:
-d, --dry-run Print out the steps taken, but don't actually run or change anything.
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose show more detailed logs
--dry-run Print out the steps taken, but don't actually run or change anything.
--verbose Prints verbose information
--help
ARGS:
POSITIONAL:
<base> the branch to rebase onto.
<top> the branch that will be rebased. defaults to current branch
[top] the branch that will be rebased. defaults to current branch
```

0 comments on commit 77e16e3

Please sign in to comment.