dimo414 / ProfileGem

A shell configuration utility to compartmentalize and manage your terminal utilities and environment
GNU General Public License v3.0
22 stars 6 forks source link

Organization/Version Control best practices #17

Closed dimo414 closed 5 years ago

dimo414 commented 5 years ago

Original report by Kovas Palunas (Bitbucket: kovasap, GitHub: kovasap).


Hey this tool is great! I wanted to quickly ask about what the best way to organize and version control gems is. Currently, I have a modified prompt.gem, a untouched util.gem, and my own gem file in the ProfileGem directory in my home directory. I have added the whole ProfileGem directory to my own dotfiles mercurial repo, minus all the ProfileGem .hg repo files. I don’t think this is the best way to go about things, and wanted to ask for some advice. Is it possible to keep all my config (include the changes I made to prompt.gem) in my own .gem directory, and version control that only? Are there any files I need to version control in the main ProfileGem dir? Do you know of anyone else who stores their ProfileGem data in a dotfiles repository, and if so, how to they do it?

dimo414 commented 5 years ago

Original comment by Michael Diamond (Bitbucket: dimo414).


Thanks for reaching out! This is definitely something that could be documented better, and I’d like to create an install script to simplify this setup for people. Although initial setup is unfortunately a bit manual, once you have all the gems in place you can update everything at once with pgem_update.

Here’s what my setup looks like (with relevant version-control directories):

~
└── ProfileGem
    ├── .hg
    ├── load.sh
    ├── local.conf.sh
    └── dimo414.gem     # my private gem with personal customizations
    |   └── .hg
    └── prompt.gem
    |   └── .hg
    └── util.gem
        └── .hg

On my work computer there's a separate employer.gem directory that contains functionality specific to my work. Not only does this mean I can leave the work-specific features out of my personal setup, but even better I can share this gem with my coworkers without burdening them with my personal setup.

Hope that helps, let me know if you have more questions.

dimo414 commented 5 years ago

Original comment by Kovas Palunas (Bitbucket: kovasap, GitHub: kovasap).


Thanks for the detailed response! I think I have some tidying up to do - if I have any question while I go through the process I’ll let you know.

dimo414 commented 5 years ago

Original comment by Michael Diamond (Bitbucket: dimo414).


Please do! I'm going to close this issue but feel free to file more if anything's unclear.