Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions git/README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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` で設定
Expand Down
10 changes: 7 additions & 3 deletions git/ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -20,4 +23,5 @@ __*
.terraformrc
terraform.tfstate
terraform.tfstate.backup
## terraform state pull > z.tfstate ってすると使い勝手がいいので
z.tfstate