git-tag

Adding Tags to a Pull Request

柔情痞子 提交于 2019-12-20 10:21:29
问题 I have a repo iontech/Anagen forked from agiliq/Anagen I made a few commits to my fork and added a tag. Then I opened a Pull Request. This Pull Request includes only my commits. How do I include the tag I've created into the Pull Request? 回答1: How do I include the tag I've created into the Pull Request? You can't. A pull request does not include tags. A pull request is only a pointer to a thread of commits (a branch) in your repository that you're proposing another repository to merge. If you

Can a lightweight tag be converted to an annotated tag?

倖福魔咒の 提交于 2019-12-17 22:13:54
问题 I've tagged a commit with a lightweight tag, and pushed that tag to a remote repo, shared with other developers. I have now realised I should have annotated it so that it appears in git describe . Is there a way to convert it/re-tag the commit without breaking things? 回答1: A lightweight tag is just a 'ref' that points at that commit. You can force-create a new annotated tag on top of the old tag: git tag -a -f <tagname> <tagname> As of Git v1.8.2, you need to use --force to replace any tags

Show which git tag you are on?

谁都会走 提交于 2019-12-17 17:19:00
问题 I'm having trouble finding out which tag is currently checked out. When I do: git checkout tag1 git branch I can't seem to find out which tag I'm on. It only logs: * (no branch) master Is it possible to find out which tags are checked out? In the above example, this would be tag1 . 回答1: Edit : Jakub Narębski has more git-fu. The following much simpler command works perfectly: git describe --tags (Or without the --tags if you have checked out an annotated tag. My tag is lightweight, so I need

How do you push a Git tag to a branch using a refspec?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 17:17:45
问题 I want to force push, for example, my tag 1.0.0 to my remote master branch. I'm now doing the following: git push production +1.0.0:master I want to force the push , because all I care about is that the code inside the 1.0.0 tag is pushed to the master branch on the remote repository. What am I doing wrong? Update #1 When I SSH into my server where my Git repository is and execute git branch -l , I don't see the master branch listed either. Update #2 After running git tag -l from inside the

How to tag an older commit in Git?

允我心安 提交于 2019-12-17 17:17:38
问题 We are new to git, and I want to set a tag at the beginning of our repository. Our production code is the same as the beginning repository, but we've made commits since then. A tag at the beginning would allow us to "roll back" production to a known, stable state. So how to add a tag to an arbitrary, older commit? 回答1: Example: git tag -a v1.2 9fceb02 -m "Message here" Where 9fceb02 is the beginning part of the commit id. You can then push the tag using git push origin v1.2 . You can do git

How to git clone a specific tag

懵懂的女人 提交于 2019-12-17 07:00:07
问题 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? 回答1: 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 回答2: Use --single-branch option to only clone history leading

What is the difference between an annotated and unannotated tag?

岁酱吖の 提交于 2019-12-17 04:09:38
问题 If I want to tag the current commit. I know both of the following command lines work: git tag <tagname> and git tag -a <tagname> -m '<message>' What is the difference between these commands? 回答1: TL;DR The difference between the commands is that one provides you with a tag message while the other doesn't. An annotated tag has a message that can be displayed with git-show(1), while a tag without annotations is just a named pointer to a commit. More About Lightweight Tags According to the

Does “git fetch --tags” include “git fetch”?

老子叫甜甜 提交于 2019-12-17 02:54:06
问题 A nice and simple question - is the function of "git fetch" a strict sub-set of git fetch --tags ? I.e. if I run git fetch --tags , is there ever a reason to immediately run git fetch straight afterward? What about git pull and git pull --tags ? Same situation? 回答1: Note: starting with git 1.9/2.0 (Q1 2014), git fetch --tags fetches tags in addition to what are fetched by the same command line without the option. See commit c5a84e9 by Michael Haggerty (mhagger): Previously, fetch's " --tags "

Git describe giving different tags

好久不见. 提交于 2019-12-13 12:17:13
问题 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

How can I get the latest tag of the form vX.X.X.X?

爷,独闯天下 提交于 2019-12-13 04:42:52
问题 Here is a list of tags I get when I do git describe --tags : v1.1.8 v1.1.9 v1.2.0 v1.2.0.1 v1.2.0.10 v1.2.0.11 v1.2.0.12 If I do git describe --tags `git rev-list --tags --max-count=1` I may get tag with either 3 digit or 4 digit. I only want to pick up the latest 4 digit tag. How can I always get the latest 4 digit git tag? What I mean by the 4 digit tag is anything with vX.X.X.X 回答1: Edit : You write I only want to pick up the latest 4-digit tag. (my emphasis) However, your question really