LoginSignup
6
6

More than 3 years have passed since last update.

WindowsにGitをインストールした後にやっておくべき設定

Last updated at Posted at 2014-03-09

alias 登録

git config --global alias.st status
git config --global alias.df diff
git config --global alias.dft "difftool --dir-diff"
git config --global alias.co checkout
git config --global alias.cm commit
git config --global alias.br branch

外部Diff/Mergeツール設定

Winmergeをインストール
バックップフォルダを設定

  • c:\bakcup
  • c:\temp

Windows7、8環境では、.gitconfigはユーザディレクトリ直下に存在。

~/.gitconfig
[merge]
    tool = winmerge
[mergetool "winmerge"]
    path = \"C:\\Program Files\\WinMerge\\WinMergeU.exe\"
    cmd  = \"C:\\Program Files\\WinMerge\\WinMergeU.exe\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"
 [diff]
    tool = winmerge
    guitool = winmerge
[difftool "winmerge"]
    path = \"C:\\Program Files\\WinMerge\\WinMergeU.exe\"
    cmd  = \"C:\\Program Files\\WinMerge\\WinMergeU.exe\" -e -ub -dl \"Base\" -dr \"Mine\" \"$LOCAL\" \"$REMOTE\"

Git Bash 外観の改善

  • Console2をインストール

    1. Settings→TabsにGitを追加
    2. ShellはGitBashのパラメータママ
    3. Startup dir を作業ディレクトリにする
    4. Settings→ConsoleでGit用の色を見やすく変更
    5. Settings→Appearance→でフォント名をMSゴシックに変更
    6. View→ConsoleWindow→プロパティでフォントをMSゴシックに変更
  • lsの文字化け対応
    alias ls='ls --show-control-chars'

  • git コマンドでの日本語ファイル名文字化け(数値コードになる)対応
    git config --global core.quotepath false

6
6
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
6
6