gst is a simple toolbox that offers additional commands (list, new, rm, doctor, update, fetch) over ghq enabled environment.
See Quick Install for the installation guide.
List uncommitted changes and unpushed commits within all repositories.
$ gst
/Users/uetchy/Repos/src/github.com/uetchy/gst (11 minutes ago)
uncommitted changes
M .travis.yml
M README.md
/Users/uetchy/Repos/src/github.com/uetchy/qiita-takeout (9 hours ago)
unpushed commits
409849d returns Promise.reject
with --short option:
$ gst --short
/Users/uetchy/Repos/src/github.com/uetchy/ferret
/Users/uetchy/Repos/src/github.com/uetchy/gst
You can also use it with peco:
cd $(gst --short | peco)
Create a new git repository.
Before start using 'new' and 'rm' command, You must set 'github.user' to .gitconfig: git config --global github.user <user>.
$ gst new epic-project
/Users/uetchy/Repos/src/github.com/uetchy/epic-project
$ gst new epic-team/epic-project
/Users/uetchy/Repos/src/github.com/epic-team/epic-project
with cd, You can jump to the created project:
cd $(gst new epic-project)
It's good for having an alias for this workflow:
newrepo() {
cd $(gst new ${1})
}Remove a git repository. It also removes the containing directory if the deleted repository was the sole repository the parent directory has.
$ gst rm retired-project`
Remove? /Users/uetchy/Repos/src/github.com/uetchy/retired-project [Y/n]
Removed /Users/uetchy/Repos/src/github.com/uetchy/retired-project
Removed /Users/uetchy/Repos/src/github.com/uetchyHealth-check over all repositories.
$ gst doctor
[bitbucket.org/uetchy/scent] git remote origin has changed:
Expected: github.com/uetchy/google-cloud-vision-raspi-sample
Actual: bitbucket.org/uetchy/scent
git pull to all repositories.
$ gst update
/Users/uetchy/Repos/src/github.com/uetchy/gst
Already up-to-date.
git fetch --tags --prune to all repositories.
$ gst fetch
/Users/uetchy/Repos/src/github.com/uetchy/gst
* [new branch] dev -> origin/dev
- [deleted] (none) -> origin/test
* [new tag] v1.0.0 -> v1.0.0
See releases.
macOS:
curl -L https://github.com/uetchy/gst/releases/download/v5.0.3/gst_darwin_amd64 > /usr/local/bin/gst
chmod +x /usr/local/bin/gst
Linux:
curl -L https://github.com/uetchy/gst/releases/download/v5.0.3/gst_linux_amd64 > /usr/local/bin/gst
chmod +x /usr/local/bin/gst
You can take a glance at what gst do before installing the actual binary, by running the containerized Docker image.
alias gst="docker run --rm -v \$(ghq root):/ghq -it uetchy/gst"
gst --help
gst listmacOS:
curl -L https://github.com/uetchy/gst/releases/download/pre-release/gst_darwin_amd64 > /usr/local/bin/gst
chmod +x /usr/local/bin/gst
Linux:
curl -L https://github.com/uetchy/gst/releases/download/pre-release/gst_linux_amd64 > /usr/local/bin/gst
chmod +x /usr/local/bin/gst
go get github.com/uetchy/gst
PRs are welcome.
go build
./gstDocker is required to run tests.
make testYasuaki Uechi π» π |
NaotoSuzuki π» |