git-tag

How to tag a git repo in a bamboo build

我的梦境 提交于 2019-12-03 02:01:35
问题 I'm trying to tag the git repo of a ruby gem in a Bamboo build. I thought doing something like this in ruby would do the job `git tag v#{current_version}` `git push --tags` But the problem is that the repo does not have the origin. somehow Bamboo is getting rid of the origin Any clue? 回答1: Yes, if you navigate to the job workspace, you will find that Bamboo does not do a straightforward git clone "under the hood", and the the remote is set to an internal file path. Fortunately, Bamboo does

Can git submodule update be made to fetch tags in submodules?

流过昼夜 提交于 2019-12-03 01:50:30
I have a git repository which uses a submodule which I'd like to point at an annotated tag, but when I do git submodule update new tags don't get fetched. I can get new tags in the submodule by cd-ing into the submodule and doing a git fetch --tags there, but I'd really like to do all of this from the outside as it's scripted. I can't find anything in the git documentation suggesting a way to get git submodule update to include tags (my git version is 1.7.3.5). Obviously there is another possibility - to point the submodule at the commit which the tag points to rather than the tag itself, but

Fetch a single tag from remote repository

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 01:46:46
This command fetches all tags: git fetch origin --tags This command fetches a specific tag: git fetch origin refs/tags/1.0.0 But that doesn't let me do: git checkout tags/2.3.18 How can I fetch a single tag and then perform a checkout? git fetch origin refs/tags/1.0.0 This fails because it doesn't write a local reference: it obtains the remote's refs/tags/1.0.0 , and any tag object(s), commits, etc., required to go with it; it drops those into FETCH_HEAD (as all git fetch commands always do); and ... that's it. It never creates reference refs/tags/1.0.0 in your repository, even though it got

Git tag release version?

喜你入骨 提交于 2019-12-03 00:38:40
A pre-release version MAY be denoted by appending a dash and a series of dot separated identifiers immediately following the patch version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. semver.org For the purpose of disambiguation, what would be a "proper" way to tag a release commit (commit from the master branch)? Some ideas v1.7.2-release v1.7.2-master v1.7.2-prod v1.7.2-official v1.7.2-stable github.com/antirez/redis/tags You can choose a policy similar to Git itself (see its tags in the GitHub repo ): v1.7.2-rc0 v1.7.2-rc1 v1.7.2-rc2 v1.7.2-rc3 v1.7.2 The idea (as

Do Git tags only apply to the current branch?

断了今生、忘了曾经 提交于 2019-12-03 00:08:49
问题 I'm currently working with a repository that has multiple branches. When I create a tag, does that tag refer to the then-current branch? In other words: Whenever I create a tag, do I need to switch to the desired branch and tag inside that branch so that the tag refers to that branch at that point in time? 回答1: If you create a tag by e.g. git tag v1.0 the tag will refer to the most recent commit of the branch you are currently on. You can change branch and create a tag there. You can also

Add new commit to the existing Git tag

邮差的信 提交于 2019-12-02 22:08:19
I have created a Git tag as v1.1 using git tag -a v1.1 -m 'my version 1.1' and I pushed that tag. Later, I made some changes related to v1.1 . Now when I push new changes and check the git tag using git describe it is showing me v1.1-g2dcc97 . How can I add my new commit to the existing tag? You can't put a new commit into an existing tag without breaking an important Git guideline: Never(*) modify commits that you have published. Tags in Git aren't meant to be mutable. Once you push a tag out there, leave it alone. You can, however, add some changes on top of v1.1 and release something like

How to tag a git repo in a bamboo build

泄露秘密 提交于 2019-12-02 17:10:27
I'm trying to tag the git repo of a ruby gem in a Bamboo build. I thought doing something like this in ruby would do the job `git tag v#{current_version}` `git push --tags` But the problem is that the repo does not have the origin. somehow Bamboo is getting rid of the origin Any clue? Yes, if you navigate to the job workspace, you will find that Bamboo does not do a straightforward git clone "under the hood", and the the remote is set to an internal file path. Fortunately, Bamboo does store the original repository URL as ${bamboo.repository.git.repositoryUrl}, so all you need to do is set a

Git Tag list, display commit sha1 hashes

雨燕双飞 提交于 2019-12-02 15:00:36
so the git tag command lists the current git tags tag1 tag2 git tag -n prints tag's message tag1 blah blah tag2 blah blah What's the best way to get the hash of tag1 & tag2 ? How about this? git show-ref --tags The git tag command is underdeveloped. A lot is desired but missing in it, like full tag details and tags in the commit history order. I like this instead, which gives exactly what I want but can't get from git tag : git log --oneline --decorate --tags --no-walk This gives a very nice color-coded view of the tags in the reverse chronological order (as it would be in the full log). That

Do Git tags only apply to the current branch?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 13:54:48
I'm currently working with a repository that has multiple branches. When I create a tag, does that tag refer to the then-current branch? In other words: Whenever I create a tag, do I need to switch to the desired branch and tag inside that branch so that the tag refers to that branch at that point in time? If you create a tag by e.g. git tag v1.0 the tag will refer to the most recent commit of the branch you are currently on. You can change branch and create a tag there. You can also just refer to the other branch while tagging, git tag v1.0 name_of_other_branch which will create the tag to

How to change the Tagger name and email of a Git Tag

江枫思渺然 提交于 2019-12-01 21:27:53
问题 Long story short I'm writing a script to migrate a very large project from (gasp) Microsoft SourceSafe to Git and I'm trying to retain the authors of the SourceSafe project's labels(which are essentially tags in Git). I know you can modify the author and committer name/date of a Git Commit but can you do the same to a Git Tag? 回答1: TL;DR Re-create the tags with the new desired data. But if anyone else had them before, they may not accept your new ones. Or they may! It's up to them , though.