Definition

A tag is a pointer to a specific commit, that is, each tag corresponds to a specific commit.

A release is a first-level object with changelogs and binaries that represents the history of a project up to a specific point in time beyond the Git schema itself. That is, with a release, you can not only represent the history of the project through the source code, but you can also describe the state of the project at that point through the compiled binaries. The idea of “going beyond the Git architecture” is that git itself can only record changes to a project, and is not inherently suited to recording compiled project binaries. A release saves the project binaries, making it easier for users to download and find specific versions of binaries.

The following is the original text as defined by the official Github announcement.

eleases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts.

Creation methods

Release is divided into two types: lightweight and annotated.

Create a tag of type lightweight.

1
git tag v1.4-lw

Creates a tag of type annotated.

1
git tag -a v1.4 -m "my version 1.4"

A tag can be used to return to a specific state of the project, so you can think of a tag as a bookmark set in a large number of commits.

To create a release, you need to go through the web interface of the source code host. You will be asked to fill in the tag name, branch, and the corresponding release notes, and you can upload compiled programs, packaged files, etc.

The Difference

Tags are a concept in git, while releases are a higher-level concept provided by source code hosts like Github. That is, git itself does not have the concept of release, only tag.

The relationship between the two is that a release is based on a tag and adds more information to the tag, usually a compiled file.

Summary

Release is an enhancement to git’s tag feature by the source code custodian. With the tag feature provided by git, we can tag a project to identify a specific version, such as v0.1.0, v1.0.0, and so on. With the release feature provided by the source code hosting provider, we can add compiled binaries such as .deb, .exe, etc. to the tag to provide more information about a specific version for the convenience of the user and to facilitate finding a specific version of the program later.