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.
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 the above file from the .gitconfig body.
+ [include] + path = ~/my_configs/.gitconfig_for_include - [alias] - ck = checkout - st = status -s [user] name = yinaura email = email@example.com
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!
gitconfig include is convenient
https://github.com/Yinaura/private configs / blob / master / .gitconfig for_include
# Original by
Git | .gitconfig を Github レポジトリで公開しよう！ ( .gitconfig の include を使う )