git-tag

unable to curl a git tag

佐手、 提交于 2019-12-05 14:04:07
I want to curl a git tag through the command line: curl -O http://someurl But when I try to untar the file it is broken? Do anyone know what is the problem? VonC You can curl a git tag from a git repos hosting service like GitHub, because it has a dedicated tarball service (like Nodeload ) which provides tar (or zip). But not any other git repo out there has that same service. See " Having trouble downloading Git archive tarballs from Private Repo " for a concrete example with GitHub (or this curl GitHub tutorial ): curl -sL --user "${username}:${password}" https://github.com/$account/$repo

Show git tags sorted by date

梦想的初衷 提交于 2019-12-04 22:56:07
How to list git tags in chronological order ? (recent tags first) git tag only displays alphabetical order. The correct answer is: git tag --sort=-taggerdate taggerdate is the appropriate field. According to the git tag man page : Prefix - to sort in descending order of the value. git tag uses the same sorting keys as git-for-each-ref , which is where the sorting keys are documented. opsidao In git 2.3.3 I can just do this to get them sorted by date: git tag --sort version:refname Simple to remember: git log --tags --decorate --simplify-by-decoration Easier to read result: git log --tags -

Git describe giving different tags

寵の児 提交于 2019-12-04 15:58:25
I have tagged my repository with the tag "Release_V1.0.0.4". But here is what I got from "git describe" and "git describe origin". [root pds_series]# git describe Release_V1.0.0.2-22-g0859de9 [root pds_series]# git describe origin Release_V1.0.0.2-18-gce2b24c With "git describe --all" and "git describe --tags" I got the right tag. [root pds_series]# git describe --all tags/Release_v1.0.0.4 [root pds_series]# git describe --tags Release_v1.0.0.4 Also, with following command I got the right tag. [root pds_series]# git log --pretty=format:'%ad %h %d' --abbrev-commit --date=short -1 2012-11-15

Determine latest received git tag

你说的曾经没有我的故事 提交于 2019-12-04 13:18:32
I need to write an autoupdate script for our project. I have everything, except that I can't determine the name of the latest received tag. I tried with git describe, but it tells me the latest checked out tag. I don't need that of course, I have to get the next reachable tag to checkout. Any idea? Try this: git describe --tags --abbrev=0 branch_name to retrieve the name of the latest tag searching back from the tip of the desired branch, rather than HEAD (the current checkout). That is, if your auto-update script has fetched origin master , you can do git describe --tags --abbrev=0 origin

Git: How to get the name of checked out tag when 2/more tags on same commit

≯℡__Kan透↙ 提交于 2019-12-04 12:56:21
I have a git commit with 2 tags, like this: commit1-----tagA,tagB Checkout "tagA" by git checkout tagA Question: How to get the tag name of current checkout? I have try git describe , but it's always return name "tagB", expect return "tagA". Seems git describe only be able to return the most recent tag name, see from git manual The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of

How to find all refs that contain a commit in their history in git

不打扰是莪最后的温柔 提交于 2019-12-04 08:37:42
Lets assume you have the following structure in git A <-- refs/heads/somebranch | B | \ C D <-- refs/tags/TAG1 | | E F | | \ G H I <-- refs/heads/branch1 | J <-- refs/heads/master Now I want to find all refs that contain commit B in their history. So it would be nice if I could do $ git refs --contains B refs/tags/TAG1 refs/heads/branch1 refs/heads/master I took a look at the git decumentation and found git branch -a --contains <commit_id> which lists all branches that contain a commit_id . $ git branch -a --contains 4af9822 master remotes/origin/someBranch ... and I found the command git tag

checkout a specific tag with git subtree

霸气de小男生 提交于 2019-12-04 03:31:25
问题 Can I use tags in subtrees? Following a specific issue: I have a git repository which includes an external repository as a subtree. I could add this external repository and checkout a specific branch from this repo. With git subtree pull --prefix=<dir> --squash <remote> <branch> the update from the selected branch works well. Now is it possible to checkout a specific tag? I couldn't find some information about tags in subtrees... 回答1: Actually any reference should work. The man page for

Do git tags apply to all branches?

笑着哭i 提交于 2019-12-03 16:14:09
问题 I'm getting my feet wet with git tagging, but my previous background is in Subversion, where "tags" were really just copies, not "real" tags... If I add a tag to a git repo, is it applied to all branches or only the current one? For example, if I currently have these branches ( git branch -v ): * master deadbeef My master head comment dev baddfeed My def head comment And the currently checked out branch is master, as you can see. Now suppose I git tag -a TAGNAME , does TAGNAME apply only to

What names are valid git tags?

岁酱吖の 提交于 2019-12-03 14:17:44
问题 I have got a error message while creating tag containing [ character: fatal: '[' is not a valid tag name. Question: are there any rules for tags in the git? 回答1: You can check if the name is valid with git check-ref-format This page contains the constraints on a valid name. Quoted from the page (possibly outdated in the future): They can include slash / for hierarchical (directory) grouping, but no slash-separated component can begin with a dot . or end with the sequence .lock . They must

Why git doesn't push tags by default?

断了今生、忘了曾经 提交于 2019-12-03 12:36:49
问题 The default behavior of Git is not to push tags from a local repository to an associated remote one. In this answer it is explained how to change this behavior for a single repository. My question, is why is this the designed behavior of Git? In particular what are the cons of setting on automatic push of tags? 回答1: If you consider the tags of any large project (kernel linux, git itself, ...) you would see tags in the hundreds . A Distributed VCS is all about publication : what do you want to