git-tags is a tool for managing Git tags, with version number increment and tag operation capabilities. With this tool, you can easily manage the version tags of your project, including displaying all tags, incrementing version numbers, pushing tags to a remote repository, and deleting tags.
This project depends on Go 1.24.4 and the following libraries:
- github.com/Masterminds/semver/v3 v3.3.1
- github.com/spf13/cobra v1.6.1
- github.com/inconshreveable/mousetrap v1.0.1 (indirect dependency)
- github.com/spf13/pflag v1.0.5 (indirect dependency)
After cloning the repository, run the following command in the project root directory to build:
go build -o git-tags main.goDisplay all tags.
./git-tags lsIncrement the patch version number and create a new tag.
./git-tags patchIncrement the minor version number and create a new tag.
./git-tags minorIncrement the major version number and create a new tag.
./git-tags majorPush tags to a remote repository. You can use the -b parameter to specify the branch, with a default value of origin.
./git-tags push -b originDelete the latest tag. You can use the -b parameter to specify a remote branch to delete the remote tag, with a default value of origin. If the -b parameter is not specified, the local tag will be deleted.
./git-tags del -b originIf you have any suggestions for improvement or find a bug, please feel free to submit an issue or a pull request.
This project is licensed under the MIT License.