Git checkout tagged version => http://untribcoody.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6Mjc6IkdpdCBjaGVja291dCB0YWdnZWQgdmVyc2lvbiI7fQ== Suggested best practices for git tagging is to prefer annotated tags over lightweight so you can have all the associated meta-data. Because eventually you need to merge it back to master. Passing the -d option and a tag identifier to git tag will delete the identified tag. Command substitution is one of them. Browse other questions tagged or. Tags have to be explicitly passed to git push. Branch The latest commit of chosen branch. It points directly to a specific commit in the history. Checking Out Tags You can view the state of a repo at a tag by using the command. Adding --tags causes your Git to obtain all their tags, and also force update. For example, say I create a branch for version 1. How to automatically checkout the latest tag of a Git repository - It will override any existing content for the v1. It is through this refspec that origin's branches become your remote-tracking branches for remote origin. I'm writing a shell script and I'm looking to checkout the latest version of repo. Specifically I want to break this process apart into multiple steps. In your case, you want to assign the output of a command to the variable. First, you have to figure out how to get the last tag name. I'll leave that up to you, as you haven't said anything about how the tag names are created. Then once you have a command that gives the last tag name, you need to assign the name into a variable. Command substitution is one of them. The bash man page is rather big, and indeed repeats all the interesting keywords multiple times, so it is really annoying to search for stuff in it. That is the command to search for a pattern. Here it describes all the kinds of expansion that the bash shell does on your line after you type it and git checkout tagged version it executes the transformed command. When in the pager, you can type h to get a list of the possible commands. I hope this wasn't too basic. If you haven't seen it before, it's hard to figure out. I'll leave that up to you, as you haven't said anything about how the tag names are created. The method given pipe git tag to tail is a stand-in for the person's own method, for demonstration purposes.