Skip to content

officel/config_git

Repository files navigation

config_git

my git config on $XDG_CONFIG_HOME/git/

usage

cd ~/.config  # $XDG_CONFIG_HOME or $HOME/.config
git clone https://github.com/officel/config_git.git ./git

# or I do it this way
cd ~/repos/github.com/officel/
git clone https://github.com/officel/config_git.git
ln -s ~/repos/github.com/officel/config_git/ ~/.config/git
  • install id_rsa (manual)
  • fix git config remote.origin.url after clone

see

related my projects

note

ローカルリポジトリだけ ignore

  • チームでは ignore しないが、個人では ignore したい
  • 個人の共通設定(このリポジトリの ignore のように)では ignore しないが、特定のリポジトリでは ignore したい
  • (リポジトリの).git/info/exclude に追加

config がどこで設定されているか

  • Windows ユーザの同僚氏のグローバルな git の設定の場所がぱっとわからなかった
  • git config --show-origin --show-scope --list

global の config

The next place Git looks is the ~/.gitconfig (or ~/.config/git/config) file, which is specific to each user. You can make Git read and write to this file by passing the --global option.

commit 時に自動改行させない

  • git のコミット本文は 72 文字でデフォルトで自動改行される
  • textwidth=0 にすればいいらしいので、/.vimrc で設定
  • あまり長いのは推奨されないので適度に自分で改行すること
# ~/.vimrc
autocmd FileType gitcommit setlocal textwidth=0

About

.config/git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages