svandragt / lamb

Literally Another Micro Blog
https://github.com/svandragt/lamb/wiki
MIT License
6 stars 0 forks source link

Question: should non-default/included themes be excluded from git? #82

Closed cameronterry closed 1 month ago

cameronterry commented 1 month ago

After following the setup instructions, I created a new theme called [root]/src/themes/custom-theme-test. I noticed that the files within custom-theme-test were showing up in source control.

Is this the expected behaviour? (Perhaps only an issue if you git clone rather than export Lamb ...)

My thinking is, I'd probably be inclined to move my custom theme into it's own repository separate from Lamb itself. This way I can version control my customisations independently of Lamb updates.

If not, then I think a modification to the .gitignore file that could be appropriate would be something like the following.

# Ignore custom themes by default
/src/themes/
!/src/themes/2024
!/src/themes/default

Essentially version control any default/included themes, and ignore the rest.

svandragt commented 1 month ago

Yeah good idea. I confirm that checking out a git repo inside the themes folder still makes the lamb project think there are new files.

You can also add a .gitignore file containing * and it will exclude the theme, as long as it's not a git repo itself. reference