Skip to content

Commit

Permalink
reimplement gita clone #202 (#216)
Browse files Browse the repository at this point in the history
* reimplement gita clone #202

The previous `gita clone config-file` corresponds to `gita clone -f config-file`

Now, by default
`gita clone <url>` translates to `git clone <url>` at the current
working directory

Also add `-C` option for changing current working directory before execution
  • Loading branch information
nosarthur authored Jan 30, 2022
1 parent bcb55e3 commit 4842ae1
Show file tree
Hide file tree
Showing 5 changed files with 811 additions and 617 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ The bookkeeping sub-commands are
- `gita add -b <bare-repo-path(s)>`: add bare repo(s) to `gita`. See the [customization section](#custom) for more details on setting custom worktree.
- `gita add -r <repo-parent-path(s)>`: add repo(s) in <repo-parent-path(s)> recursively
- `gita clear`: remove all groups and repos
- `gita clone <config-file>`: clone repos in `config-file` (generated by `gita freeze`) to current directory.
- `gita clone -p <config-file>`: clone repos in `config-file` to prescribed paths.
- `gita clone <URL>`: clone repo from `URL` at current working directory
- `gita clone <URL> -C <directory>`: change to `directory` and then clone repo
- `gita clone -f <config-file>`: clone repos in `config-file` (generated by `gita freeze`) to current directory.
- `gita clone -p -f <config-file>`: clone repos in `config-file` to prescribed paths.
- `gita context`: context sub-command
- `gita context`: show current context
- `gita context <group-name>`: set context to `group-name`, all operations then only apply to repos in this group
Expand Down
6 changes: 4 additions & 2 deletions doc/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
[customization section](#custom)
- `gita add -r <repo-parent-path(s)>`: 递归添加路径下的所有库
- `gita clear`:
- `gita clone <config-file>`: 克隆`<config-file>` (由`gita freeze`生成)里的库
- `gita clone -p <config-file>`: 克隆`<config-file>`里的库并放到指定路径
- `gita clone <URL>`:
- `gita clone <URL> -C <directory>`:
- `gita clone -f <config-file>`: 克隆`<config-file>` (由`gita freeze`生成)里的库
- `gita clone -p -f <config-file>`: 克隆`<config-file>`里的库并放到指定路径
- `gita context`: 情境命令
- `gita context`: 显示当前的情境
- `gita context none`: 去除情境
Expand Down
Loading

0 comments on commit 4842ae1

Please sign in to comment.