4 个版本
0.1.3 | 2019年11月4日 |
---|---|
0.1.2 | 2019年11月4日 |
0.1.1 | 2019年10月26日 |
0.1.0 | 2019年10月24日 |
#56 in #用户名
19KB
414 行
mkrepo
创建目录,并使用 git init
以及初始提交来模仿 ghq 的管理目录结构。
安装
cargo install mkrepo
用法
mkrepo
需要以下 .gitconfig
值。
ghq.root
mkrepo.service
mkrepo.username
或user.name
将这些值添加到您的 ~/.gitconfig
。
[user]
name="himanoa"
[ghq]
root="~/src"
[mkrepo]
service="github.com"
username="himanoa"
简单
$ mkrepo sample-repository
$ ls -al ~/src/github.com/himanoa/sample-repository
./ ../ .git/
覆盖作者名称
$ mkrepo -a himanoa-sandbox sample-repository
$ ls -al ~/src/github.com/himanoa-sandbox/sample-repository
./ ../ .git/
覆盖服务名称
$ mkrepo -s example.com sample-repository
$ ls -al ~/src/example.com/himanoa/sample-repository
./ ../ .git/
覆盖第一个提交信息
$ mkrepo -m "Custom initial commit message" sample-repository
$ cd ~/src/github.com/himanoa/sample-repository
$ git show
commit 838a05bebd96e04a21d539946c92f78f9eb233d0 (HEAD -> master)
Author: himanoa <[email protected]>
Date: Fri Oct 25 05:20:10 2019 +0900
Custom initial commit message
作者
许可证
MIT
依赖
~11MB
~273K SLoC