Customizing Release files/structure

Hello fellow Gitters,

we are currently working with a private repository hosted on GitHub and I couldn’t find anything useful on Google, so I’d like to ask for some help: To optimize our deploy process, we would like to automatically remove specific files/folders from the generated ZIP-archive. Is there any way to customize the deploy process with a script or something like that? Wether it’s a visual terminal, or a script in python/php/etc. is irrelevant for us.

In other words we would like to strip development files such as “TODO.txt” from the release version automatically, when creating it on the projects webpage. Does anyone have some hints on how to handle files that are added to the branch, but need to be stripped from the stable release?

Kind regards,
Marcel Töpel

Hi @bavoko,

As this post has to do with modifying releases on a GitHub project, I moved it to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

Let me know if you have any other questions or if I can help with anything else.


1 Like

Here’s a thought, and it’s just a random one at that since I don’t have Git or GitHub on my PC at the moment…

Since .gitignore ignores files when you’re uploading to a git repo, try the reverse by making a .gitignore in your repo that has the files you don’t want to show up in the downloaded zip in the file.

I might be wrong, so don’t take my word for it.

Hi Tanner,

thanks for leaving a reply :slight_smile: That’s a way we could go, but we would like to make use of the syncing feature whilst developing. So the files need to be in the repo for the whole development time as they either serve as testing data or organisational extensions. For example: We have builtin file that will provide a Dev-Mode if it is present and activated. This file is maintained with the rest of the code and needs to be synced on change too. So ignoring the file would eliminate the syncing feature and we would either need a new repo or have to copy the files ourselves.

So a prerequisite is that the files are not ignored in every normal process and do actually show up in their branch. They just need to be removed when packaging the release version.

Anyway, thanks for the help though :slight_smile:



I have the same question myself and came here looking for suggestions. Did you get anywhere with this? It seems to be such a normal course of business that I can’t imagine that a technique hasn’t been perfected. Maybe they are trade secrets? :wink:

My thought was that I would use a Dev branch->Release Branch->Master Branch flow and when the Dev branch is merged into Release the extra files and scripts that aren’t “production” would be removed. Perhaps with a script that would actually remove itself.

Then when the Release was merged into the Master branch those files would not be there.

In this case the Master would never merge into Dev or those files would disappear. Any hotfixes, etc. applied to the Master directly would need to be cherry-picked.

That’s my take. I haven’t implemented it yet but I’ve thought about it for a while.

Bill W