2008-07-15
Windows から Git を使う方法
rails が svn から git に移行したし、そろそろ git を使う必要があると観念して調べてみました。
Windows から git を使う公式な方法は cygwin しかないみたい*1ですが、
非公式な方法として msysgit というアプリケーションを使う方法があります。
msysgit - Google Code
http://code.google.com/p/msysgit/
今回は Git-1.5.6.1-preview20080701.exe をダウンロードしてインストールしました。
インストール
Adjusting your PATH environment
コマンドプロンプトから使用したいので、「Run Git from the Windows Command Prompt」を選択。
Choosing the SSH executable
使うとすれば putty を使うので「Use PLink」を選択。
インストール完了したら、コマンドプロンプトを立ち上げて、git がインストールされたことを確認します。
C:\>git usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tre e=GIT_WORK_TREE] [--help] COMMAND [ARGS] The most commonly used git commands are: add Add file contents to the index bisect Find the change that introduced a bug by binary search branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and merge with another repository or a local branch push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG See 'git help COMMAND' for more information on a specific command.
使い方は、例えば jpmobile ならこんな感じ。
# チェックアウト git clone git://github.com/darashi/jpmobile.git # プラグインインストール ruby script/plugin install git://github.com/darashi/jpmobile.git
ちなみに rails2.0.2 では git からのプラグインインストールはできませんでしたが、2.1.0 で試すとうまく動きました。
トラックバック - http://d.hatena.ne.jp/kusakari/20080715/1216091060
リンク元
- 34 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja-JP-mac:official&hs=kDJ&q=cookie_only+2.2&btnG=検索&lr=lang_ja
- 28 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4SKPB_jaJP282JP283&q=console+確認
- 16 http://www.google.co.jp/search?hl=ja&lr=lang_ja&client=firefox-a&rls=org.mozilla:ja:official&hs=ymJ&q=jstl+配列+サイズ&revid=2002823631&sa=X&oi=revisions_inline&resnum=0&ct=top-revision&cd=1
- 15 http://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=JSP+beans+配列&num=50
- 14 http://www.google.co.jp/search?hl=ja&q=スナップイン+エラー&btnG=Google+検索&lr=
- 13 http://www.google.co.jp/search?sourceid=navclient&aq=t&hl=ja&ie=UTF-8&rls=GGLG,GGLG:2005-40,GGLG:ja&q=rails+scaffold wrong+エラー+arguments
- 12 http://reader.livedoor.com/reader/
- 11 http://d.hatena.ne.jp/zariganitosh/20080621/1214110380
- 11 http://www.google.co.jp/search?hl=ja&client=firefox&rls=org.mozilla:ja-JP-mac:official&hs=yuf&q=undefined+method+`require_gem'&btnG=検索&lr=lang_ja
- 8 http://www.google.co.jp/search?q=Call+to+undefined+function+mysql_connect()+&lr=lang_ja&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:official&client=firefox-a