diff --git a/git/README.md b/git/README.md index b5b1da3..adc696f 100644 --- a/git/README.md +++ b/git/README.md @@ -1,22 +1,31 @@ -# config_git +# git my git config on $XDG_CONFIG_HOME/git/ -## usage +- `~/.ssh/` に鍵を置くのを忘れないこと +- @TODO .vimrc の分離(コメントを残すのを忘れないこと) +- @note task で config を管理するのどうかなぁ(中長期に渡って悩んでいる) -```bash -cd ~/.config # $XDG_CONFIG_HOME or $HOME/.config -git clone https://github.com/officel/config_git.git ./git +## tl;dr -# 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 +```bash +# このリポジトリのルートディレクトリ(このファイルのひとつ上のディレクトリ) +dotfiles $ pwd +/home/raki/officel/dotfiles + +# git の設定は XDG_BASE_DIRECTORY の XDG_CONFIG_HOME/git に置いてある、ということ +dotfiles $ ls -l ~/.config/git +lrwxrwxrwx 1 raki raki 31 1月 2 02:56 /home/raki/.config/git -> /home/raki/officel/dotfiles/git + +# 中身はこのディレクトリ +dotfiles $ ls -l ~/.config/git/ +合計 8 +-rwxrwxrwx 1 raki raki 2458 12月 31 14:24 README.md +-rwxrwxrwx 1 raki raki 114 12月 31 14:25 allowed_signers +-rwxrwxrwx 1 raki raki 1903 12月 31 14:25 config +-rwxrwxrwx 1 raki raki 669 1月 3 04:33 ignore ``` -- install id_rsa (manual) -- fix git config remote.origin.url after clone - ## see - [Git - git-config Documentation](https://git-scm.com/docs/git-config) @@ -25,13 +34,6 @@ ln -s ~/repos/github.com/officel/config_git/ ~/.config/git - [Conventional Commits](https://www.conventionalcommits.org/) - [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/) -# related my projects - -- [officel/config_aqua: .config/aqua](https://github.com/officel/config_aqua) -- [officel/config_bash: .config/bash](https://github.com/officel/config_bash) -- [officel/config_git: .config/git](https://github.com/officel/config_git) -- [officel/config_task: .config/task](https://github.com/officel/config_task) - # note ## ローカルリポジトリだけ ignore @@ -53,7 +55,7 @@ ln -s ~/repos/github.com/officel/config_git/ ~/.config/git > 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 時に自動改行させない +## commit 時に自動改行させない @TODO .vimrc を管理するようにしたら削除予定 - git のコミット本文は 72 文字でデフォルトで自動改行される - `textwidth=0` にすればいいらしいので、`/.vimrc` で設定 diff --git a/git/ignore b/git/ignore index fcb7564..01fc5ba 100644 --- a/git/ignore +++ b/git/ignore @@ -4,14 +4,17 @@ *.swp # temporary file -*.nogit -*.nogit.md +## git に含めないファイルの拡張子を変更してしまえば楽だと思った +## *.nogit +## VS Code で拡張子がないとファイルタイプを教えるのが手間だなってなった +## *.nogit.md +## アンダーバーニ個始まりのファイルはgitに含めないというルールにした(イマココ) __* # ansible-vault password file in repo .vault_password -# for act(github actions localy) +# for act(github actions locally) .act.secrets .act.env @@ -20,4 +23,5 @@ __* .terraformrc terraform.tfstate terraform.tfstate.backup +## terraform state pull > z.tfstate ってすると使い勝手がいいので z.tfstate