Fetch a single tag from remote repository

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 … Read more

how to close a branch in git

Updated Answer As @user3159253 stated in comments of this answer : git garbage-collects commits which aren’t referenced, directly or indirectly, by a named reference (branch, tag, etc). That is why it is important to leave a reference to a freezed branch. You can tag the tip of the branch by archiving it, and then delete … Read more

Understanding Gitlab CI tags

Tags for GitLab CI and tags for Git are two different concepts. When you write your .gitlab-ci.yml, you can specify some jobs with the tag testing. If a runner with this tag associated is available, it will pickup the job. In Git, within your repository, tags are used to mark a specific commit. It is … Read more

Git tag before or after merge?

Depends. Will the branch fast-forward into master? If the answer is ‘yes’ then it doesn’t matter whether you tag it before or after doing the fast-forward merge, because the tagged commit will be the same either way. If the answer is ‘no’, then you should probably tag it after merging into master (assuming you cut … Read more

Get last git tag from a remote repo without cloning

TL;DR With git ls-remote you can get a list of references from a remote repository. To see what the latest version is, look at the last line of output from: git -c ‘versionsort.suffix=-‘ ls-remote –tags –sort=”v:refname” <repository> To only output the latest tag (for instance in a shell script) of a repository that uses Semantic … Read more

Adding Tags to a Pull Request

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 want to notify the upstream repository that a … Read more

git tag delete and re-add

The reference is https://stackoverflow.com/a/5480292/1317035 You just need to push an ’empty’ reference to the remote tag name: git push origin :tagname Or, more expressively, use the –delete option: git push –delete origin tagname Pushing a branch, tag, or other ref to a remote repository involves specifying “push where, what source, what destination?” git push where-to-push … Read more

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

…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, commit 627a129, commit d0e0747, commit 2c72ed7, commit e1790f9, commit 59caf52, commit 82f34e0, commit 6fb23f5, commit ca3065e, commit bf16ab7, commit … Read more

“git describe” ignores a tag

git describe uses only annotated tags by default. Specify the –tags option to make it use lightweight tags as well. Make sure you’ve checked out the correct commit (git rev-parse HEAD). Annotated tags are created with git tag -a. If you do git show <tagname> and you see the commit only, it’s a lightweight tag; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)