![]() ![]() Pushing the tags is similar to pushing anything on the remote repository. Therefore, let's push these tags and see where they are available in GitHub. But, these commits are not yet visible on our remote repository on GitHub. So, we are all set now by tagging the commits on local machines. The user can view all the tags in the repository by the following command: Sometimes different OS do not show the tag in one line command for previous versions also. Note: Viewing tags like this sometimes depends on the client and operating systems. ![]() If the user intends to view the tags and commits, they can also use the git log -oneline command like as shown below: Here we go! We have tagged the commit successfully. m is the flag to tell that the sentence that is followed is the commit message. Note: " -a" denotes the annotated tags, which in layman terms means tags that are specific and not generalized. To list out the commits, let's execute the git log -oneline command once again. How To Tag Specific Commit In Git?įor tagging a specific commit, we will make use of the hash code of that particular commit. Now you can check yourself by executing git log -oneline command that the tag creation is successful.Īlthough this command will tag the last commit on the branch dev, you can also tag with a specific commit in Git.Note: A commit to dev branch will not reflect in any other branch. Let's tag the last commit on the dev branch by executing the following command: We can now create a tag onto any of these commits. ![]() How To add a Tag In Git?Ĭheck if you have a clean working directory.Įxecute the following command to view the commits: In this section, we will see both of them. Tags can be associated with either the commit to which the HEAD points or a specific commit that the user likes. So, if the git log seems new to you, it is advised to read the tutorial about the git log command first. But, the user must be familiar with the Git Log beforehand. How To Create Tags in Git?Ĭreating the tags in Git is very simple. So let's see how we can tag in Git and push the same local tags to the remote repository located in the remote repository. For releases, GitHub provides another option. In addition to that, no matter how much time we spend on the project, any new member can look at the git log and identify unique points in the project's timeline through Git. You can tag any commit for any purpose you want. Tags in Git are the reference points in the Git history that denotes special events. Tags might sound a little different as a concept. We will see this in the later sections of this post. Although Git limits the feature to just marking essential events or milestones in the project, GitHub has extended this feature to the release versions of the software. Tags do not appear significant, but they stand as one of the most robust features in Git and GitHub. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |