BuvinJ
BuvinJ

Reputation: 11056

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...

Upvotes: 12

Views: 2020

Answers (1)

MrTux
MrTux

Reputation: 34002

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).

Upvotes: 1

Related Questions