git-tag

Create a tag in a GitHub repository

烂漫一生 提交于 2019-12-28 07:12:19
问题 I have a repository in GitHub and I need to tag it. I tagged in a shell, but on GitHub it is not showing up. Do I have to do anything else? The command I used in the shell is: git tag 2.0 And now when I type git tag it shows: 2.0 So it seems like tags are present, correct? The repository is: https://github.com/keevitaja/myseo-pyrocms. How do I make this tag show up on GitHub? Where are my tags? 回答1: You can create tags for GitHub by either using: the Git command line, or GitHub's web

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

我与影子孤独终老i 提交于 2019-12-28 03:26:05
问题 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. 回答1: ...also prune tags no longer on a remote git fetch gets with Git 2.17 (Q2 2018) an handy short-hand

Can I use git pre-push hook only for that case when I made a new tag?

天涯浪子 提交于 2019-12-25 08:57:03
问题 I would like to use git pre-push hook only for that cases when I added a new tag. Can I somehow analyze the push for this information? 回答1: As described in the Git githooks documentation for pre-push : Information about what is to be pushed is provided on the hook’s standard input with lines of the form: <local ref> SP <local sha1> SP <remote ref> SP <remote sha1> LF For instance, if the command git push origin master:foreign were run the hook would receive a line like the following: refs

How to create tag with forward slash in its name

你离开我真会死。 提交于 2019-12-23 07:47:54
问题 Is there any way to create git tag with forward slash in its name when I already have the similar-looking one? Suppose that I have "1.16.0" tag and I want to create "1.16.0/1.0.0" tag: $ git tag "1.16.0/1.0.0" error: 'refs/tags/1.16.0' exists; cannot create 'refs/tags/1.16.0/1.0.0' fatal: refs/tags/1.16.0/1.0.0: cannot lock the ref 回答1: It's not possible. See, the name of tag (any reference, in fact; the same goes with branches) is treated as the name of the file system object, created in

Separate branches or git projects?

北城余情 提交于 2019-12-23 02:38:29
问题 I'm introducing Git in our company. I have several applications that all interact together via sockets, and now, it is about to decide whether I should use separate branches for different parts of my application, or separate Git projects. I also want to use tags for revisions; if I use branches, I have to tag like branchnameV1.0, but if I use separate Git projects I could tag like v1.0`. What would be the most conventional method for doing this? 回答1: Separate Git projects: branches are

Git Subdirectory Filter with tags

百般思念 提交于 2019-12-21 21:36:39
问题 I am attempting to split a large repo into multiple smaller ones. The goal is to split a folder and retain the tags in the process. I have tried: git filter-branch --prune-empty --subdirectory-filter my-folder develop This correctly place my-folder at the root of the new project, and retained the tags. However checking out a tag resulted in seeing the entire old directory structure within the new repo. So I tried: git filter-branch --tag-name-filter cat --prune-empty --subdirectory-filter my

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

心已入冬 提交于 2019-12-21 12:26:27
问题 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 tag for a subfolder of a repository

笑着哭i 提交于 2019-12-21 04:02:10
问题 I use Git to import a SVN repository. Then I created my own project as a subfolder in the repository. I use the SVN repository with Git-SVN. My working procedure is: git commit -am "message" git svn rebase git svn dcommit . Now I want to tag my project with git tag -a RC1 -m 'Release Candidate 1' , but I only want that my project gets the tag. How can I do that? 回答1: TL;DR version It's possible to tag specific directories (aka trees) if you know the tree's SHA-1, but it's not often done & not

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

荒凉一梦 提交于 2019-12-20 11:50:12
问题 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

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

别等时光非礼了梦想. 提交于 2019-12-20 11:49:11
问题 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