9. Tags
Git allows you to create tags, which are named references to specific commits. To create a tag,
use the following command:
git tag <tag_name> <commit_hash>
To list tags, use the following command:
git tag
To delete a tag, use the following command:
git tag -d <tag_name>
10. Git Workflow
There are many different Git workflows that teams can use, but one popular workflow is the
Gitflow workflow. In the Gitflow workflow, there are two main branches: master and develop.
The master branch contains the production-ready code, while the develop branch contains the
code that is being actively developed.
When working on a new feature or bug fix, a developer creates a new branch off of the develop
branch. Once the work is complete, the developer creates a pull request (PR) to merge the
changes into the develop branch. The PR is reviewed by other team members, and once it is
approved, the changes are merged into the develop branch.
When it is time to release a new version of the code, the develop branch is merged into the
master branch. This creates a new version of the code that is ready for release.
Conclusion
Git is a powerful tool for managing changes to code and collaborating with other developers. In
this guide, we covered the essential concepts and commands for using Git. With this
knowledge, you should be able to use Git to manage your code and work with other developers
effectively.