Windowsでgit/githubを使う設定

参考:CygwinでGit(GitHub)を始めるための準備・設定メモ - Rewish


既にMacでgitとgithubを使っているので、tortoise gitは使わずmsysgitのbash shellだけで使う。msysgitにbashとopensshが付いてくるのでcygwinもいらない。


まずmsysgitインストールする
http://code.google.com/p/msysgit/
設定は全部デフォルトでいい。



細かい設定する。
c:\Documents and Settings/username/.gitconfig を作成して

[user]
	name = shokai
	email = hashimoto(at)shokai.org
[color]
	ui = auto


c:\Documents and Settings/username/.ssh/ ができているので、github.comに接続する時の秘密鍵を指定する
鍵(github_rsa)はMacで使ってる物を持ってきた


c:\Documents and Settings/username/.ssh/config

Host github.com
  User git
  Port 22
  Hostname github.com
  IdentityFile ~/.ssh/github_rsa
  TCPKeepAlive yes
  IdentitiesOnly yes


これでスタートメニューからgit bash shellを起動して、ふつうにgitコマンド使ってcommitしてpush等もできる。