Giter Club home page Giter Club logo

ghq's Introduction

ghq(1) wercker status

NAME

ghq - Manage remote repository clones

DESCRIPTION

'ghq' provides a way to organize remote repository clones, like go get does. When you clone a remote repository by ghq get, ghq makes a directory under a specific root directory (by default ~/.ghq) using the remote repository URL’s host and path.

$ ghq get https://github.com/motemen/ghq
# Runs `git clone https://github.com/motemen/ghq ~/.ghq/github.com/motemen/ghq`

You can also list local repositories (ghq list), jump into local repositories (ghq look), and bulk cloning repositories from several web services (ghq import).

SYNOPSIS

'ghq' get [-u] <repository URL> | [-u] [-p] <user>/<project>
'ghq' list [-p] [-e] [<query>]
'ghq' look <project> | <user>/<project> | <host>/<user>/<project>
'ghq' import starred [-u] <user>
'ghq' import pocket [-u]

COMMANDS

get

Clone a GitHub repository under ghq root directory. See DIRECTORY STRUCTURES below. If the repository is already cloned to local, nothing will happen unless '-u' ('--update') flag is supplied, in which case 'git remote update' is executed.
When you use '-p' option, the repository is cloned via SSH.
If there are multiple ghq.root 's, existing local clones are searched first. Then a new repository clone is created under the primary root if none is found.
Currently supports GitHub and Google Code Project (Git/Mercurial) repositories.

list

List locally cloned repositories. If a query argument is given, only repositories whose names contain that query text are listed. '-e' ('--exact') forces the match to be an exact one (i.e. the query equals to project or user/project) If '-p' ('--full-path') is given, the full paths to the repository root are printed instead of relative ones.

look

Look into a locally cloned repository with the shell.

import starred

Retrieves GitHub repositories that are starred by the user specified and performs 'get' for each of them.

import pocket

Retrieves Pocket entries of github.com and performs 'get' for each of them.
To use this, needs to be compiled with Pocket consumer key. See INSTALLING.

CONFIGURATION

Configuration uses 'git-config' variables.

ghq.root

The path to directory under which cloned repositories are placed. See DIRECTORY STRUCTURES below. Defaults to ~/.ghq.
This variable can have multiple values. If so, the first one becomes primary one i.e. new repository clones are always created under it. You may want to specify "$GOPATH/src" as a secondary root (environment variables should be expanded.)

ghq.ghe.host

The hostname of your GitHub Enterprise installation. A repository that has a hostname set with this key will be regarded as same one as one on GitHub. This variable can have multiple values. If so, ghq tries matching with each hostnames.

DIRECTORY STRUCTURES

Local repositories are placed under 'ghq.root' with named github.com/user/repo.

~/.ghq
|-- code.google.com/
|   `-- p/
|       `-- vim/
`-- github.com/
    |-- codegangsta/
    |   `-- cli/
    |-- google/
    |   `-- go-github/
    `-- motemen/
        `-- ghq/

INSTALLING

go get github.com/motemen/ghq

Or clone the repository and run:

make install

If you want to enable Pocket importing feature:

go get -ldflags "-X github.com/motemen/ghq/pocket.ConsumerKey <your Pocket consumer key>" github.com/motemen/ghq

Or using Makefile:

make install POCKET_CONSUMER_KEY=<your Pocket consumer key>

AUTHOR

motemen <[email protected]>

ghq's People

Contributors

kentaro avatar mattn avatar motemen avatar moznion avatar sixeight avatar tcnksm avatar tricknotes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.