To add a tag to a previous commit in a Git repository that you have cloned locally, you can follow these steps