LoginSignup
43
45

More than 5 years have passed since last update.

Windows環境でGitBucket

Last updated at Posted at 2014-09-20

サーバー側の設定

JRE のインストール

http://www.oracle.com/technetwork/java/javase/downloads/index.html から JRE(jre-7u*-windows-*.exe) をダウンロードしてインストール。

Tomcat のインストール

  1. http://tomcat.apache.org/download-70.cgi から「32-bit/64-bit Windows Service Installer」をダウンロード。
  2. インストール先(例:C:/tomcat)を指定してインストール。

GitBucketの検索キーワードが文字化けしないようにする対策

conf/server.xml を、下記の通り変更する。

<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />

<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443"
    URIEncoding="UTF-8"
    useBodyEncodingForURI="true" />

GitBucket のインストール

  1. https://github.com/takezoe/gitbucket/releases から gitbucket.war をダウンロード。
  2. システム環境変数に GITBUCKET_HOME を設定(例:D:/GitBucket)。
  3. C:\tomcat\webapps にwarファイルを配置。
  4. http://****:8080/gitbucket へ接続して動作することを確認。

クライアント側の設定

git for windows のインストール

  1. http://msysgit.github.io/ からインストーラをダウンロードして実行。
  2. 「Select Components」で、
    • 「Windows Explorer integration」のチェックを外す。
    • 「Associate .sh files to be run with Bash」のチェックを外す。
    • 「Use a TrueType font in all console windows (not only for Git Bash)」のチェックが外れていることを確認。
  3. 「Adjusting your PATH environment」で「Use Git from the Windows Command Prompt」を選択。
  4. 「Configuring the line ending conversions」で「Checkout as-is, commit as-is」等を選択。(使用部署での方針に合わせて設定)

ユーザー名とメールアドレスの設定

c:\<ユーザー名>\.gitconfig に以下を追記。

[user]
    name = <名前>
    email = <メールアドレス>

エディタをサクラエディタに変更

c:\<ユーザー名>\.gitconfig に以下を追記。

[core]
    editor = 'C:/Program Files (x86)/sakura/sakura.exe' -CODE=4

mergetool の設定

c:\<ユーザー名>\.gitconfig に以下を追記。

[merge]
    tool = WinMerge
[mergetool "WinMerge"]
    cmd = 'C:/Program Files/WinMerge/WinMergeU.exe' //r //e //u //wl //wr \"$LOCAL\" \"$BASE\"  \"$REMOTE\" //o  \"$MERGED\"
[mergetool]
    keepBackup = false

WinMerge のインストール

3方向マージ機能を使うため、バージョンは2.14.0-jp-29以降であること

  1. http://www.geocities.co.jp/SiliconValley-SanJose/8165/winmerge.html からダウンロードしてインストール。
  2. オプション > バックアップファイル > バックアップフォルダを選択し、適当なバックアップフォルダを設定。

GitBucket からダウンロードしたZIPファイル内の日本語ファイル名が文字化けする場合の対応

http://support.microsoft.com/kb/2704299/ja の修正プログラムをあてる。

参考

43
45
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
43
45