git Tutorial
Introduction 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 IDEAtags in git
Tags can be used to record the milestones or important releases in Git history. There are 2 types of tags in Git.- Lightweight.
- Annotated – In this type of tags, we can specify the author creating tags and also provide tag description.
git tag v1.1
To view all tags on current branch, you can use below command.
git tag
Creating Annotated tags Now let us see how to create a annotated tag. Below command creates a annotated tag.
git tag -a v1.3 -m “version 1.3”
We can also tag specific commit using below command
git tag -a v1.4 347dh82
We can push the tags to remote repository using below command.
git push origin v1.0
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 checkout -b b4 v1.0
Here is the output of above example.
Web development and Automation testing
solutions delivered!!