Change source code uploaded by GitHub


I would like to do a release on one of my project but by default GitHub add the source code of the current master branch.
I would have like to know if I can change the commit targeted (or if there is just a way to not upload it)

Thanks in advance,

From GitHub Help » Managing releases in a repository:


you can see that you can choose other branches from the Target: dropdown.

Also, releases are associated to tags, which are not limited to a specific branch. When you create a tag (whether from GitHub’s WebUI or via Git on the command line) GitHub will create a release matching the commit referenced by that tag.

You can always edit (or even delete) releases on your repository — although it’s preferable not to, unless strictly necessary, especially if some end users have already downloaded the release archive (i.e. it might leave contradicting release versions behind).

Creating a release isn’t really related to “uploading”, it’s about tagging a commit which is already in the repository (on GitHub). GitHub releases allow you to attach custom archives (Zip file) to any tagged release (e.g. pre-compiled binaries), but these are “extra”, and the core of the release is the commit pointed to by tagged reference.