0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

~/.ssh 用の .gitignore

Posted at

~/.ssh

お行儀悪いですが

~/.ssh/config
Include conf.d/*/config

な感じで、以下(例)のような感じです

$ tree -a -I '.git'
.
├── .gitignore
├── conf.d
│   ├── bitbucket.org
│   │   ├── foo.bitbucket.org
│   │   ├── foo.bitbucket.org.pub
│   │   └── config
│   ├── github.com
│   │   └── config
│   └── gitlab.com
│       └── config
├── config
├── id_rsa.pub
└── baz.somewhere.pub

.gitignore

調子に乗って .gitignore を書いてみました。

.gitignore 周りの仕様が変わるかもしれないし、そもそもあまりお薦めはしません。

/path/to/やっぱやめた/.gitignore
*

*.swp
*.tmp
*.pem
*.lock
known_hosts
!config
!.gitignore
!*.pub

!conf.d
!conf.d/*
conf.d/*/*
!conf.d/*/.gitignore
!conf.d/*/config
!conf.d/*/*.pub

!の良い練習になると思ってやっみたけど一応こんな感じかなと。

ただ、途中でリスクでかすぎると思って結局止めたんですけどね。
一部冗長なのはやはり怖いからです :sweat:

ご参考まで

0
2
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
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?