Skip to content

vvatanabe/gitb

Repository files navigation

gitb Build Status Coverage Status

A command line tool for using Backlog's git comfortably. https://gitb.vvatanabe.com/

Description

gitb command helps to use Backlog's git comfortably. For example, can open PR, issue, branches, tags, etc in the browser with one action.

Also, gitb wraps all git commands, therefore can execute git-command using gitb like a gitb fetch, gitb pull, gitb push, and more...

Suffix B has multiple meanings. Backlog, Browser, B-Dash.

Installation

Homebrew

It can be installed with Homebrew, the package manager for MacOS.

$ brew tap vvatanabe/gitb
$ brew install gitb

Go

If you have the Go(go1.13+) installed, you can also install it with go get command.

$ go get github.com/vvatanabe/gitb

GitHub Release Page

Built binaries are available on Github releases:
https://github.com/vvatanabe/gitb/releases

Usage

Pull Request

Related to Backlog Pull Requests for the current repository.

COMMANDS:

gitb pr [-s <STATE>]

 Open the pull request list page in the current repository.

gitb pr show [<PR-ID>]

 Open the pull request page. When no specify <PR-ID>, open the PR page related to the current branch.

gitb pr add [-b <BASE>]

 Open the page to create pull request with the current branch.

gitb pr blame [git blame command options] <PATH>

 Show backlog's pull request id with git blame.

OPTIONS:

-s, --state <STATE>

 Filter pull requests by STATE. Values: "open" (default), "closed", "merged", "all".

-b, --base <BASE>

 BASE is base branch name. Default is empty.

Issue

Related to Backlog Issues for the current repository.

COMMANDS:

gitb issue [-s <STATE>]

 Open the issue list page in the current project.

gitb issue show

 Open the issue page related to the current branch.

gitb issue add

 Open the page to create issue in the current project.

OPTIONS:

-s, --state <STATE>

 Filter issues by STATE. Values: "all", "open", "in_progress", "resolved", "closed", "not_closed" (default).

Browse

Open other git page (e.g. branch, tree, tag, and more...) in current repository.

COMMANDS:

gitb browse branch

 Open the branch list page in the current repository.

gitb browse tag

 Open the tag list page in the current repository.

gitb browse tree

 Open the tree page in the current branch.

gitb browse history

 Open the history page in the current branch.

gitb browse network

 Open the network page in the current branch.

gitb browse repo

 Open the repository list page in the current project.

gitb browse show

 Open the corresponding page to given file or directory in current project.

gitb browse commit <hash>

 Open the commit page to given hash in current project.

Alias

Please write an alias to .XXXrc (.bashrc, .zshrc, config.fish) if you want to use gitb <command> as git <command>.

Bash, Zsh

function git(){
  gitb "$@"
}

Fish

function git
  gitb $argv
end

Acknowledgments

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.

License

MIT License

Author

vvatanabe