Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tag _with a message_ to a commit #1381

Closed
jbrains opened this issue Jul 9, 2021 · 11 comments
Closed

Add a tag _with a message_ to a commit #1381

jbrains opened this issue Jul 9, 2021 · 11 comments
Labels
enhancement New feature or request

Comments

@jbrains
Copy link
Contributor

jbrains commented Jul 9, 2021

I would find it very pleasant to be able to add a message when creating a tag. I know that I can do this from the command line, but I would like to have the option of adding a message to the tag when I use the "Add tag" command.

Clearly this is (merely) a UX nicety. Perhaps this becomes a simpler feature for a new contributor to work on. I don't feel comfortable enough with golang to do it myself.

@jbrains jbrains added the enhancement New feature or request label Jul 9, 2021
@fsmiamoto
Copy link
Contributor

I think I can tackle this one!

To avoid adding an extra step for those that do not want it, I'd say we should add it as a separate keybinding e.g. ^t.

How does it sound @jesseduffield?

@jesseduffield
Copy link
Owner

I would use the same keybinding but open a menu with the option to create a tag without and with a message. I believe its called an annotated tag when it comes with a message but not sure if that’s a well-known term.

Worth noting there are two places we can create a tag: in the commits panel and in the tags tab: I would use the same menu in both for the two different keybindings

@nagy135
Copy link

nagy135 commented Oct 20, 2021

I would like to ask if there is any progress here. Tags are probably the last thing I need to drop to prompt for. Creating tag for commit is already supported I just dont see option to push with tags (git push --tag). Imho I would prefer regular push bind to also push tags, but there might be separate bind for it.

@jesseduffield
Copy link
Owner

@nagy135 there is a PR for this in motion now: #1469.
As for pushing tags: by default we include the --follow-tags arg when pushing. You can also push an individual tag by pressing shift+P on that tag

@jesseduffield
Copy link
Owner

Actually now would be a good time to ask @nagy135: do you intend on having multi-line messages against these tags?

@nagy135
Copy link

nagy135 commented Oct 20, 2021

@jesseduffield apologies, i was at 0.28 so its probably my fault ...all i m looking for is tagging certain commits so it matches with my docker images and from what you said i already can do that. Thanks

@jesseduffield
Copy link
Owner

Now that this is done, I'll close this off, and if somebody has a need for multi-line here we can have a new issue for that

@JonatasAmaral
Copy link

hey, am i missing something here?
how can i add a tag to the branch?

i've installed it from go, and can see the tags tab
but can't se any "tag" option on menu (? or x) over branch

i was expecting to hover a branch, press "t", and get a input box (just like commit)

ps. a can see the tag option on commits panel only, so there's it, i only exists there?

@mark2185
Copy link
Collaborator

mark2185 commented Feb 8, 2023

@JonatasAmaral try going to the Tags tab in the Local Branches panel (] switches tabs) and pressing n there. That should create a tag of the currently checked out branch.

@JonatasAmaral
Copy link

JonatasAmaral commented Feb 8, 2023

thanks @mark2185, that solver my case a bit.

but i personally think it should me possible to tag the branch (any hovered one), and press "t" on it to tag.

pushing it there looks a bit harder. my first thought was "t" to tag, "T" to push the tag (maybe create & pushing)
but it would make it confuse, considering how it is done on Commits panel (as "t" used for revert, to "T" simply tag it)

should i create a new issue to suggest it?

@mark2185
Copy link
Collaborator

mark2185 commented Feb 8, 2023

should i create a new issue to suggest it?

There's already a PR meant to resolve the issue you've stumbled upon today :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants