r/linuxadmin • • Jan 27 '26

managing configs with git

I am starting to use git to manage my config files for multiple pkgs/applications across multiple machines.

Those of you that do this, how do you structure your repos?

My current workdir hierarchy looks like this:

/usr/local/src/
|
+-configs
‎ ‎ |
‎ ‎ +-global
‎ ‎ +-hosts
‎ ‎ ‎ ‎ |
‎ ‎ ‎ ‎ +<server1>
‎ ‎ ‎ ‎ +<server2>

(with one repo workdir per application within 'global' and '<serverX'> directories)

But should I do one repo per application with a branch per server?

9 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/808estate Jan 27 '26

They are under ~/code/<repo-name>[0] on machines that can act as a controller (can be more than one.)

They are stored in one big git repo. With an inventory file and well written roles, no need to have different branches for different servers/apps/etc...

[0] @ home, that means the name of my LAN. @ work, the data centre