Gpr

Gitkeeper.

Description

Gpr provides a simple management of the git repository.

Behave like a go get of Golang.

For example, all repositories are cloned to $HOME/.gpr/<host>/<user>/<repository>.

It is possible to centrally manage of the all repositories.

Installation

$ gem install gpr

Requirements

  • Ruby 2.1.0 or higher

Usage

$ gpr help

Register a git repository into Gpr directory

Just clone a git repository into $HOME/.gpr/<host>/<user>/<repository>.

# e.g. gpr get [email protected]:kaihar4/gpr.git
$ gpr get <repository url>

Show all registered repositories

Usage:
  gpr list

Options:
  [--paths], [--no-paths]  # Show the paths of all registered repositories

Show all registered repositories

Select a repository using the interactive interface

$ gpr select

Possible use as this.

select

Other benefits is here.

Show your contributions of registered repositories

Display in graph format.

$ gpr contrib

contrib

Show the status of all registered repositories

You can check the status of the registered repositories at a glance.

$ gpr status

status

Search the specified keyword in registered repositories

Show a list of the files that the specified keyword is included.

Usage:
  gpr search

Options:
  -f, [--file=FILE]              # Filter by filename
  -h, [--host=HOST]              # Filter by host
  -r, [--repository=REPOSITORY]  # Filter by repository

Search the specified keyword in registered repositories

search

$ gpr update

Fetch all registered repositories

# e.g. gpr fetch origin
$ gpr fetch <remote repository>

Also possible to specify the branch.

# e.g. gpr fetch origin master
$ gpr fetch <remote repository> <branch>

If you run for short, it means gpr fetch origin.

$ gpr fetch

Configuration

Change the directory to be cloned

$ export GPR_ROOT=$HOME/develop

Install the zsh completion

$ gpr get https://github.com/kaihar4/gpr.git
$ cd $HOME/.gpr/github.com/kaihar4/gpr
$ rake zsh:install
$ source ~/.zshrc

Convenient aliases

# Change Directory to a directory that you specify
alias gcd='cd $(gpr select)'
# Remove a directory that you specify
alias grm='rm -rf $(gpr select)'

# And more...
alias gcontrib='gpr contrib $(gpr select)'
alias gfetch='gpr fetch $(gpr select)'