LoginSignup
9
7

More than 5 years have passed since last update.

おれのgit config

Last updated at Posted at 2014-11-03

毎回「git config オススメ」とかで調べるのがめんどくさいので自分用に作ります。

最初にこれ

普通にシェルのエイリアス設定しときます。

alias g="git"

それから、--global 打つのがダルいので。

g config --global alias.cfg "config --global"

設定

[core]
    excludesfile = ~/.gitignore_global
    autocrlf = false
    pager = less -r
    editor = vim
    precomposeunicode = true
    quotepath = false
[alias]
    cfg = config --global
    c = commit
    p = push
    pl = pull
    a = add
    b = branch
    rmt = remote -v
    co = checkout
    m = merge
    df = diff
    st = status
    f = fetch --all -p
    rsh = reset --hard
    fp = fetch origin+refs/pull*:refs/remotes/pull/*
[color]
    ui = auto
[push]
    default = current
[pull]
    rebase = true
[hub]
    protocol = https
[credential]
    helper = gcloud.sh
[pager]
    log = diff-highlight | less
    show = diff-highlight | less
    diff = diff-highlight | less
[diff]
    compactionHeuristic = true
g cfg core.excludesfile ~/.gitignore
g cfg core.autocrlf false
g cfg core.pager "less -r"
g cfg core.editor vim
g cfg color.ui auto
g cfg core.precomposeunicode true
g cfg core.quotepath false
g cfg push.default current
g cfg pull.rebase true

alias

ここは完全に趣味ですよね

[alias]
    cfg = config --global
    c = commit
    p = push
    pl = pull
    a = add
    b = branch
    rmt = remote -v
    co = checkout
    m = merge
    df = diff
    st = status
    f = fetch --all -p
    rsh = reset --hard
    fp = fetch origin+refs/pull*:refs/remotes/pull/*
g cfg alias.c "commit -v"
g cfg alias.b branch
g cfg alias.co checkout
g cfg alias.p push
g cfg alias.st status
g cfg alias.df diff
g cfg alias.rmt "remote -v"
9
7
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
9
7