Skip to content
Create repo directory for ghq style
Rust
Branch: master
Clone or download
Latest commit 6d543d5 Nov 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Remove windows-gnu support Nov 4, 2019
src Remove unnecessary println! macro Nov 4, 2019
.gitignore Update .gitignore Oct 22, 2019
Cargo.lock Release v0.1.3 Nov 4, 2019
Cargo.toml Release v0.1.3 Nov 4, 2019
LICENSE Add LICENSE and README.md Oct 24, 2019
README.md Add `mkrepo.username` Oct 27, 2019

README.md

mkrepo

Create directory and git init and initial commit in imitation of ghq's management directory structure.

Installation

cargo install mkrepo

Usage

mkrepo requires following .gitconfig values.

  • ghq.root
  • mkrepo.service
  • mkrepo.username or user.name

Add these values to your ~/.gitconfig.

[user]
name="himanoa"
[ghq]
root="~/src"
[mkrepo]
service="github.com"
username="himanoa"

Simple

$ mkrepo sample-repository
$ ls -al ~/src/github.com/himanoa/sample-repository
./ ../ .git/

Overwrite author name

$ mkrepo -a himanoa-sandbox sample-repository
$ ls -al ~/src/github.com/himanoa-sandbox/sample-repository
./ ../ .git/

Overwrite service name

$ mkrepo -s example.com sample-repository
$ ls -al ~/src/example.com/himanoa/sample-repository
./ ../ .git/

Overwrite first commit message

$ mkrepo -m "Custom initial commit message" sample-repository
$ cd ~/src/github.com/himanoa/sample-repository
$ git show

commit 838a05bebd96e04a21d539946c92f78f9eb233d0 (HEAD -> master)
Author: himanoa <matsunoappy@gmail.com>
Date:   Fri Oct 25 05:20:10 2019 +0900

    Custom initial commit message

Author

LICENSE

MIT

You can’t perform that action at this time.