Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enabled "include tags" on a push by default in TortoiseGit?

When I push from TortoiseGit, tags are not included by default. In a recent update, however, an option was added to help with this. There is now a check box in the push dialog to "include tags". How do I set this to enabled by default?

I don't want to forget to add the check when I want to push a tag. A this point, I don't use any tags locally which I don't want to push and thus share with other developers.

I tried adding

[push]
  followTags = true 

to my gitconfig file (local, global, systemwide, tgitconfig...) which TortoiseGit lets you edit from Settings->Git, but that neither set the switch, nor performed the action when I pushed...

like image 297
BuvinJ Avatar asked Sep 01 '15 16:09

BuvinJ


People also ask

How do I add a tag to a pushed commit?

Right click on the commit you want to tag, and click Create Tag at this version... Back to Log Message dialog, right click on that tag label, click Push "tag_name"...

Does git push tags by default?

Sharing tags is similar to pushing branches. By default, git push will not push tags. Tags have to be explicitly passed to git push .

How do you tag push?

Sharing Tags You will have to explicitly push tags to a shared server after you have created them. This process is just like sharing remote branches — you can run git push origin <tagname> . If you have a lot of tags that you want to push up at once, you can also use the --tags option to the git push command.

Which command is used to push a tag into remote repository?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.


1 Answers

As of today TortoiseGit (v. 2.1.0) doesn't remember the "push tags" state.


However, as a workaround you can configure your remote you push to to always push all tags, e.g. put something like that in your .git/config:

[remote "origin"]
    url = ...
    push = ... (your old push line)
    push = +refs/tags/*:refs/tags/*

The + at the beginning indicates to force push all remote tags (remove the prefix in order to prevent that).

like image 109
MrTux Avatar answered Sep 19 '22 18:09

MrTux