gitconfig
- systemを開くとき
$ git config --system -e
- globalを開くとき
$ git config --global -e
中身
/usr/local/etc/gitconfig
[alias]
st = status
ch = checkout
co = commit
gr = log --graph --oneline
br = branch
ad = add
ps = push
pl = pull
- bash_profileにもこんな設定
~/.bash_profile
alias gc='git branch | peco | xargs git checkout'
これでgcと打てばブランチ名をインクリメンタルサーチしてチェックアウトできる
コマンド達
-
git reset:addの取り消し -
git commit --amend:commitした後にaddしてcommitをやり直す -
git checkout ファイル名: そのファイルの変更を戻す -
git checkout .: 全てのファイルの変更を戻す