git-tag

How to list all tags along with the full message in git?

核能气质少年 提交于 2019-11-27 19:41:22
问题 I want git to list all tags along with the full annotation or commit message. Something like this is close: git tag -n5 This does exactly what I want except that it will only show up to the first 5 lines of the tag message. I guess I can just use a very large number. What is the highest number I can use here? Is it the same on every computer? UPDATE : I have had much time to think about this, and now I think I don't necessarily want to show the entire message if it is extraordinarily long.

In git, how do I sync my tags against a remote server?

帅比萌擦擦* 提交于 2019-11-27 17:42:06
Is there a way to keep my local git tags in lockstep with a remote's tags? That is -- not only get new tags when created (as usual, when fetch -ing/ pull -ing), but also prune tags no longer on a remote and also delete existing tags when someone else git push -f 's a tag. I know I can git fetch remotename followed by git remote prune remotename to achieve similar behaviour for branches. ...also prune tags no longer on a remote git fetch gets with Git 2.17 (Q2 2018) an handy short-hand for getting rid of stale tags that are locally held. See commit 6317972 , commit 97716d2 , commit e249ce0 ,

Why isn't my tag listed when I checkout with Git GUI?

依然范特西╮ 提交于 2019-11-27 17:00:31
问题 I have a local Git repository which contains three annotated tags: v0.1.0 , v0.1.1 , and v0.1.2 . When I view my project's history with gitk ( Repository → Visualize master's history ), I can see each tag assigned to the proper commit. However, when I try to checkout my tags in Git GUI ( Branch → Checkout... → Tags ), the tag for v0.1.1 doesn't appear. When I went to check each tag in gitk, I noticed that the tag details were slightly different. The details for v0.1.0 and v0.1.2 listed them

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

僤鯓⒐⒋嵵緔 提交于 2019-11-27 16:56:27
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 README file, commited the changes and pushed the commit. Deleted tag dev , created it again and pushed tags

Checking out Git tag leads to “detached HEAD state”

◇◆丶佛笑我妖孽 提交于 2019-11-27 16:37:14
I'm developing a deployment script for my git project and I just started using tags. I've added a new tag called v2.0 : git tag -a v2.0 -m "Launching version 2.0" And I've pushed this tag to the remote repository git push --tags When I try to execute the deployment script and check out the v2.0 tag I get this message: You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create,

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

倾然丶 夕夏残阳落幕 提交于 2019-11-27 16:37:12
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? peritus 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 system allows automated tools to inspect your package and determine SemVer compliance and released

How to create a new branch from a tag?

家住魔仙堡 提交于 2019-11-27 08:55:40
问题 I'd like to create a new master branch from an existing tag. Say I have a tag v1.0 . How to create a new branch from this tag? 回答1: Wow, that was easier than I thought: git checkout -b newbranch v1.0 回答2: If you simply want to create a new branch without immediately changing to it, you could do the following: git branch newbranch v1.0 回答3: I used the following steps to create a new hot fix branch from a Tag. Syntax git checkout -b <New Branch Name> <TAG Name> Steps to do it. git checkout -b

Do git tags get pushed as well?

只愿长相守 提交于 2019-11-27 06:05:46
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?. eevar You could do this: git push --tags 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 use $ git push <remote> tag <tagname> to push a single tag, or $ git push <remote> --tags to push all tags

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

爷,独闯天下 提交于 2019-11-27 05:57:18
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 ? hurrymaplelad 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> per @dantheta's comment: As of npm 1.1.65, Github URL can be more concise user/project. npmjs.org/doc/files/package.json.html You can attach the branch like user

How can I list all lightweight tags?

99封情书 提交于 2019-11-27 03:13:01
问题 I want to list all of the lightweight tags in my repository; the best I can think of involves combining git for-each-ref , grep , and cut , but it seems like it'll be kind of fiddly... (While we're at it, we might as well talk about the same thing for annotated tags: someone is sure to end up here wondering about that at some point.) Edit: By lightweight tags, I meant those tag refs that do not refer to tag objects. (In other words, unannotated tags.) 回答1: All the lightweight tags are in the