git TutorialIntroduction Installing Git Understanding Git architecture Initializing the new Git respository Cloning new Git repository .git directory in Git repository Viewing Git configuration First time Git configuration Using SSH keys with Git Checking Git status Adding files into staging area in Git Committing changes to the local repository Ignoring files using .gitignore Viewing the history of commits Viewing the file contents in working directory, staging area and repository Viewing difference between files Viewing the history of files Git revert Git Reset git reflog Creating and switching to new branches in Git Viewing existing branches Merging branches Resolving conflicts Rebase Deleting branches Renaming the branch in Git Push Pull Stashing the changes in Git Tags in Git Patches in Git Creating new repository on GitHub Pushing local repository to remote repository like GitHub IntelliJ IDEA
tags in gitTags can be used to record the milestones or important releases in Git history. There are 2 types of tags in Git.
- Annotated – In this type of tags, we can specify the author creating tags and also provide tag description.
To view all tags on current branch, you can use below command.
git tag v1.1
Creating Annotated tags Now let us see how to create a annotated tag. Below command creates a annotated tag.
We can also tag specific commit using below command
git tag -a v1.3 -m “version 1.3”
We can push the tags to remote repository using below command.
git tag -a v1.4 347dh82
To check out specific tag in new branch, you can use below command. In below command, we are checking out tag – v1.0 to branch b4.
git push origin v1.0
Here is the output of above example.
git checkout -b b4 v1.0
Web development and Automation testing