git-tag

How to git clone a specific tag

廉价感情. 提交于 2019-11-27 02:41:11
From git-clone(1) Manual Page --branch can also take tags and detaches the HEAD at that commit in the resulting repository. I tried git clone --branch <tag_name> <repo_url> But it does not work. It returns: warning: Remote branch 2.13.0 not found in upstream origin, using HEAD instead How to use this parameter? git clone --branch <tag_name> <repo_url> This command is not supported in git 1.7.9.5. I use git 1.8.3.5 and it works Sahil kalra Use --single-branch option to only clone history leading to tip of the tag . This saves a lot of unnecessary code from being cloned. git clone <repo_url> -

How to list all Git tags?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 02:22:57
In my repository, I have created tags using the following commands. git tag v1.0.0 -m 'finally a stable release' git tag v2.0.0 -m 'oops, there was still a major bug!' How do you list all the tags in the repository? VonC git tag should be enough. See git tag man page You also have: git tag -l <pattern> List tags with names that match the given pattern (or all if no pattern is given). Typing "git tag" without arguments, also lists all tags. More recently (" How to sort git tags? ", for Git 2.0+) git tag --sort=<type> Sort in a specific order. Supported type is: " refname " (lexicographic order)

Remove local git tags that are no longer on the remote repository

孤街醉人 提交于 2019-11-27 02:20:13
We use tags in git as part of our deployment process. From time to time, we want to clean up these tags by removing them from our remote repository. This is pretty straightforward. One user deletes the local tag and the remote tag in one set of commands. We have a little shell script that combines both steps. The 2nd (3rd, 4th,...) user now has local tags that are no longer reflected on the remote. I am looking for a command similar to git remote prune origin which cleans up locally tracking branches for which the remote branch has been deleted. Alternatively, a simple command to list remote

Git - Checkout a remote tag when two remotes have the same tag name

一个人想着一个人 提交于 2019-11-26 23:52:40
I had hoped this would work: git checkout remote/tag_name but it doesn't. This does: git checkout tags/tag_name but I'm doing something weird where I have a lot of remotes, and I'm worried about what happens if two remotes have the same tag. Is there a way to specify the remote when checking out the tag? torek Executive summary: what you want to achieve is possible, but first you must invent remote tags. You do this with a series of refspecs, one for each remote. The rest of this is about what these are, how they work, and so on. Your question asks about checking out a "remote tag", but Git

“tag already exists in the remote" error after recreating the git tag

ぐ巨炮叔叔 提交于 2019-11-26 18:47:49
问题 I get the following error after I run the steps below: To git@provider.com:username/repo-name.git ! [rejected] dev -> dev (already exists) error: failed to push some refs to 'git@provider.com:username/repo-name.git' hint: Updates were rejected because the tag already exists in the remote. Created the repository Cloned the repo on the local machine. Modified the README file, commited the changes and pushed the commit. Created tag dev : git tag dev Pushed tags: git push --tags Modified the

Is there a standard naming convention for git tags? [closed]

情到浓时终转凉″ 提交于 2019-11-26 18:45:30
问题 I've seen a lot of projects using v1.2.3 as the naming convention for tags in git. I've also seen some use 1.2.3 . Is there an officially endorsed style, or are there any good arguments for using either? 回答1: Version 1.0.0 of Semantic Versioning, by Tom Preston-Werner of GitHub fame, had a sub-specification addressing this: Tagging Specification (SemVerTag) This sub-specification SHOULD be used if you use a version control system (Git, Mercurial, SVN, etc) to store your code. Using this

How to tell which commit a tag points to in Git?

断了今生、忘了曾经 提交于 2019-11-26 18:00:28
I have a bunch of unannotated tags in the repository and I want to work out which commit they point to. Is there a command that that will just list the tags and their commit SHAs? Checking out the tag and looking at the HEAD seems a bit too laborious to me. Update I realized after I went through the responses that what I actually wanted was to simply look at the history leading up to the tag, for which git log <tagname> is sufficient. The answer that is marked as answer is useful for getting a list of tags and their commits, which is what I asked. With a bit of shell hackery I'm sure it's

Depend on a branch or tag using a git URL in a package.json?

房东的猫 提交于 2019-11-26 12:34:41
问题 Say I\'ve forked a node module with a bugfix and I want to use my fixed version, on a feature branch of course, until the bugfix is merged and released. How would I reference my fixed version in the dependencies of my package.json ? 回答1: From the npm docs: git://github.com/<user>/<project>.git#<branch> git://github.com/<user>/<project>.git#feature\/<branch> As of NPM version 1.1.65, you can do this: <user>/<project>#<branch> 回答2: per @dantheta's comment: As of npm 1.1.65, Github URL can be

Do git tags get pushed as well?

一笑奈何 提交于 2019-11-26 11:51:12
问题 Since I created my repository it appears that the tags I have been creating are not pushed to the repository. When I do git tag on the local directory all the tags are present, but when I logon to the remote repository and do a git tag , only the first few show up. What could the problem be?. 回答1: You could do this: git push --tags 回答2: In default git remote configuration you have to push tags explicitly (while they are fetched automatically together with commits they point to). You need to

Remove local git tags that are no longer on the remote repository

倾然丶 夕夏残阳落幕 提交于 2019-11-26 10:04:24
问题 We use tags in git as part of our deployment process. From time to time, we want to clean up these tags by removing them from our remote repository. This is pretty straightforward. One user deletes the local tag and the remote tag in one set of commands. We have a little shell script that combines both steps. The 2nd (3rd, 4th,...) user now has local tags that are no longer reflected on the remote. I am looking for a command similar to git remote prune origin which cleans up locally tracking