1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ghq | Cygwin64 環境に ghq をインストール

Posted at

ghq | Cygwin64 環境に ghq をインストール

概要

Cygwin64 環境に ghq をインストールします。
ghq の導入記事はたくさんあるけど、 Qiita 内を「 ghq cygwin」 で検索したら1件もなかったのでメモを残す。

ghq とは?

motemen さん製の リモートリポジトリ管理ツール。
golang の go get のようにリモートリポジトリを管理する手段を提供する。
go get の詳細については golang の 公式ドキュメント 参照。

手順

疎通確認

$ ghq
NAME:
   ghq - Manage GitHub repository clones

USAGE:
   ghq [global options] command [command options] [arguments...]

VERSION:
   v0.5 (master)

AUTHOR:
  motemen - <motemen@gmail.com>

COMMANDS:
   get          Clone/sync with a remote repository
   list         List local repositories
   look         Look into a local repository
   import       Bulk get repositories from stdin
   root         Show repositories' root
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h           show help
   --version, -v        print the version

# ghq get はデフォルトでホームディレクトリ配下に .ghq ディレクトリを作成し、
# そこにリポジトリを clone します
$ ghq get https://github.com/tbpgr/aun.git
     clone https://github.com/tbpgr/aun.git -> path\to\your\user dir\.ghq/github.com/tbpgr/aun
       git clone https://github.com/tbpgr/aun.git path\to\your\user dir\.ghq/github.com/tbpgr/aun
Cloning into 'path\to\your\user dir\.ghq/github.com/tbpgr/aun'...
remote: Counting objects: 75, done.
remote: Total 75 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (75/75), done.

$ path\to\your\user dir\.ghq/
$ tree
.
┗ github.com
    ┗ tbpgr
        ┗ aun
            ┣ aun.gemspec
            ┣ bin
            ┃ ┗ aun
            ┣ Gemfile
            ┣ images
            ┃ ┗ aun.gif
            ┣ lib
            ┃ ┣ aun
            ┃ ┃ ┣ default_messages.rb
            ┃ ┃ ┣ definition_manager.rb
            ┃ ┃ ┣ finder.rb
            ┃ ┃ ┣ message.rb
            ┃ ┃ ┣ message_formatter.rb
            ┃ ┃ ┗ version.rb
            ┃ ┗ aun_core.rb
            ┣ LICENSE.txt
            ┣ Rakefile
            ┣ README.md
            ┣ rubocop-todo.yml
            ┗ spec
                ┣ aun
                ┃ ┣ finder_spec.rb
                ┃ ┣ message_formatter_spec.rb
                ┃ ┗ message_spec.rb
                ┗ spec_helper.rb

参照

ghq GitHub

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?