11
10

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.

【メモ】Git for Windows + MinGWな環境の.bashrc

Last updated at Posted at 2014-05-27

http://qiita.com/poad1010/items/d6252f1271934e7f17b4
MSYS2を使うと、RubyもGitも小細工なしで使えるため、余程の理由がない限りはMinGWではなくMSYS2を推奨します。
Git for WindowsもMSYS2がベースっぽいし

DevKitでも一緒だとは思う。
mingw-getが使えるから、DevKitにしていないけど…
Ruby自体、あんまり使ってないし

因みに、MinGWは32bit版です。64bit版は試したことない。

.bashrc
# less コマンド等のエラー回避
export TERM=msys
 
# lsで日本語を表示する
alias ls='ls --color=auto --show-control-chars'
alias ll='ls -l'
alias l='ls -CF'
 
# gettext用
export OUTPUT_CHARSET=UTF-8
 
# viコマンド
alias vi='vim.exe'
 
# git
alias git='git.exe'

source /c/Program\ Files\ \(x86\)/Git/etc/git-prompt.sh
source /c/Program\ Files\ \(x86\)/Git/etc/git-completion.bash
 
# ロケール他
export TZ=JST-9
export LANG=ja_JP.UTF-8
export LC_ALL='C'
export TPUT_COLORS=256
export HOSTNAME=msys-bash
PS1='[\[\033[0m\]\u\[\033[00;32m\]@$HOSTNAME\[\033[0m\] \t \w\[\033[0m\]$(__git_ps1)\[\033[00m\]] \n\$ '

export PATH=~/.packer:$PATH:/c/Program\ Files\ \(x86\)/Git/bin

これの何が便利かって言うと、mintty上でgitが使えるってこと。

11
10
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
11
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?