+5

Remote Tag support

Marc Strapetz 6 years ago updated by Declan 2 weeks ago 5

Git itself does not have "remote tags" as an explicit concept but one can workaround it by introducing custom refs, like 'rtags'. This basically requires to add an additional fetch-refspec like:

[remote "origin"]
  ...
  fetch = +refs/tags/*:refs/rtags/origin/*

This makes Git always reflect and update the server-side state of tags on pulls and pushes.

Now, SmartGit could interpret this special "rtags" refs and apply the same logic to it as it does for remote and local branches:

- evaluate ahead/behind/diverged state for tags

- in the Log, have puzzle-piece display of tags

- forced-push checks for tags

- ...

I wouldn't got that far with ahead/behind jigsaw pieces. Just the information whether a tag exists locally and remotely as well as equal/different would be enough for the majority of the use cases.

+2

I would also appreciate to see in SmartGit if a tag is pushed already. We use tags to start our deployment process via gitlab runner.

After creation of the tag you need to push it to the server to start the gitlab runner CI process.

Every now and than a developer forgets to push the tag and wonders why the process doesn't start.

For this usecase it would be sufficient, if smartgit checks, if any local tag is not on the remote yet.


Thanks a lot,

Michael

I often have a local repo with tags, and one or more remote repos (which often are just "backups" of my local work).
My most typical use case:
I make several commits, and every so often push to my main remote. Every so (less) often push to my other remote too.
Smartgit does a great job of showing me when my local commit history is different to my remotes (or the remotes different to each other), and helping me see when I need to push to which here.
As soon as I start using tags it much less help, especially since they need to be pushed individually

Its a pity smartgit isnt more help here. It seems to just show tags locally with no info on which of them are where (or if pushed at all)  on remotes. So its really easy to get out of sync, especially since each tag has to be pushed individually to each remote. Things get especially easy to mess up if I decide i need to move a tag locally, and have to repeat all individual pushes.
Would be great to get some more help on (remote) tags. possible suggestions:
add option to push any tag on a commit as well as commit itself.
and/or an option push to "all remotes" (something that also would be valuable in itself - and optionally including the tags)

Git only supports the concept of tracked *branches*, not tracked *tags*.

Im not sure this is any reason why smartgit couldnt still be a lot more helpful here. All the suggestions I made, for example still seem valid, would provide value (and seem not particularly difficult to implement)