如何在 git gui 中使用标签进行版本控制 [英] How to use tags for versioning in git gui

查看:16
本文介绍了如何在 git gui 中使用标签进行版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是个十足的菜鸟,所以要温柔!

I'm a complete and utter noob, so be gentle!

我正在使用 git gui,并且从未接触过命令行界面.我是菜鸟,和我一起工作的一些人甚至是菜鸟……

I'm using git gui, and never touching the command line interface. I'm a noob, and some of the people i'm working with are even noob-ey-er...

当前状态:- 我在 git hub 上有一个存储库,其中包含一些脚本(以下称为代码")
- 我正在使用 git gui (mysysgit)
- 我做了commit和push,对CVS有一个模糊的了解
- 我认为我们不需要分支

Current state: - I have a repository on git hub which contains a handful of scripts (henceforth 'code')
- I'm using git gui (mysysgit)
- I have made commits and push's and have a vague understanding of CVS
- I don't believe we will need to branch

我觉得我应该能够使用标签来创建代码的版本.我也感觉"在存储快照(或指向...的链接)的文件系统中应该有一个等效的结构.

I feel that I should be able to use tags to create versions of the code. I also 'feel' like there should be an equivelant structure in the filesystem where the snapshots (or links to...) are stored.

例如:
.EdsLittleThingv1.0
.EdsLittleThingv1.1
.EdsLittleThingv1.2
等等

eg:
.EdsLittleThingv1.0
.EdsLittleThingv1.1
.EdsLittleThingv1.2
etc

但是,我不知道如何在 git gui 中创建标签.我能找到的唯一标签引用似乎与合并分支有关,这对我没有帮助.

However, I can not work out how to create a tag within git gui. The only tag reference i can find seems to be tied to merging branches, and that doesn't help me.

我在网上搜索过,但找不到关于如何使用 Git Gui 创建和管理版本的单一参考.

I have scoured the web, and can not find a single reference on how to create and manage versions using Git Gui.

我希望能够创建一个稍微简单一点的版本:

I want to be able to create a slightly more simple version of this:

最后说明:虽然我被引导相信我的答案是在标签"中找到的,但我真的不在乎它是否真的通过使用修订/分支/其他来回答.

Final note: Whilst I'm led to believe that my answer is found in 'tags', I dont really care if its really answered by using revisions / branches / whatever.

推荐答案

你想用gitk,可以通过Repository->Visualize…

You want to use gitk, available by Repository->Visualize…

在顶部窗格中,右键单击要标记的提交,然后选择创建标记.

In the top pane, right click on the commit you want to tag at, and select create tag.

在 git 模型中,您通常不会将标签签出到同一存储库下的磁盘.您可以有多个存储库(全部从上游克隆),或者在一个修订版的不同修订版中不建议多个工作目录,但大多数时候只需使用 git 的工具就无需同时签出多个版本.

In the git model, you do not typically have tags checked out to disk under the same repository. You could have multiple repositories (all cloned from upstream) or the not suggested multiple working directories at different revisions with one revision, but most times simply using git's tool obviates the need to have multiple versions checked out at the same time.

您的建议是 nothing 像 gitflow 模型,所以我不建议将其用作参考.阅读 ProGit 书籍 http://progit.org 以获得好的建议和其他一些工作流程.我使用的不是上述任何一种.

What you are suggesting is nothing like the gitflow model, so I don't recommend using that as a reference. Read the ProGit book, http://progit.org for good advice and a few other workflows. I use one which is none of the above.

您通常会在重要的里程碑处添加标签.当一段代码成为客户可见时,或者当我们准备好进入正式 QA 实践的代码时,我会进行标记.通常不需要标记为提醒事情发生的时间.这就是提交消息的用途.

Typically you tag at major milestones. I tag when a piece of code becomes customer visible, or when we have code ready to move into formal QA practices. There is typically no need to tag as reminders of when things happened. That is what commit messages are for.

这篇关于如何在 git gui 中使用标签进行版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆