如果可能,如何在SourceTree中命名存储?(How to name a stash in SourceTree if possible?)

编程入门 行业动态 更新时间:2024-10-18 03:28:48
如果可能,如何在SourceTree中命名存储?(How to name a stash in SourceTree if possible?)

我正在使用SourceTree(mac)。 我有一些隐藏的变化。

如何为每个存储提供自定义名称以更好地识别代码应该执行的操作?

现在当我藏匿它时,在[branchname] [最后提交消息]上的WIP表格中获得一个自动名称

I am using SourceTree (mac). I have a few stashed changes.

How do I give each stash a custom name to better identify what the code is supposed to do?

Right now when I stash it gets an automatic name in the form WIP on [branchname] [last commit message]

最满意答案

您可以在创建存储时打开的对话框中为存储提供名称:

暂存一些更改的文件 单击工具栏中的“存储”按钮 将显示以下对话框。 在“消息”字段中提供名称。 提供的“消息”将用作存储的名称

藏匿消息

如果您尝试重命名现有存储,看起来目前无法在SourceTree中执行此操作 - SourceTree中的唯一选项是应用删除选定的存储。

Git一般不提供重命名存储的内置方法 - 共识似乎是删除并使用新名称重新创建存储。 请参阅如何重命名git stash以查找更详细地解决此问题的问题。

You can provide a name for the stash in the dialog box that opens when you create a stash:

Stage some changed files Click the "Stash" button in the toolbar The following dialog shows up. Provide a name in the "Message" field. The provided "Message" will be used as the name of the stash

Stash Message

If you are trying to rename an existing stash, it looks like there's no way to currently do this in SourceTree - the only options in SourceTree are to apply or to delete the selected stash.

Git in general does not provide a built-in way to rename a stash - the consensus seems to be to drop and recreate the stash with a new name. See how can I rename a git stash for a question that addresses this in more detail.

更多推荐

本文发布于:2023-04-28 05:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1330328.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   SourceTree   stash

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!