LoginSignup
0
0

More than 1 year has passed since last update.

Publish Git | .gitconfig to your Github repository! (use the .gitconfig include)

Last updated at Posted at 2019-04-15

Configuration files tend to be "secrets of secrets", but how about publishing more and more!

However, I think there are also personal names, project-specific parts, and things that you do not want to disclose. So we use the .gitconfig include feature.

Public file

Apart from .gitconfig, create an include file in a directory of your choice and manage git. The file name may be anything.

For example, if you publish only the alias settings, it looks like this:

 [alias] ck = checkout st = status -s 

include

Include the above file from the .gitconfig body.

 + [include] + path = ~/my_configs/.gitconfig_for_include - [alias] - ck = checkout - st = status -s [user] name = yinaura email = example@email.com 

result

By doing this, you can manage the repository by making only "the part you want to publish" independent. You don't have to copy and paste public .gitconfig.

All you have to do is push to Github!

reference

Original by

Git | .gitconfig を Github レポジトリで公開しよう! ( .gitconfig の include を使う )

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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