While using git, we all have our code in our own repository, pushing to and pulling from a bare repository.
If I need parts of the newest code in a specific folder for later use by an automated script, what would be the best way to get the code from the personal repository to that specific folder? (Is there a "git way" of doing this?)
Thank you.
Git only
If you only want to rely exclusively on Git features, a combination of a
post-reciveserver-side hook combined with an externalworktreeat the location where your automated script expects to find the updated scripts.Rough sketch:
Github
If your bare git repo is actually hosted on Github or a local Gitlab instance, you might have the benefit of using Github Actions or Gitlab CI pipelines. For just this action, both mechanisms introduce much baggage, but scale much better to much more automation around your development, especially increased visibility (you see which actions were triggered by event).