-
Notifications
You must be signed in to change notification settings - Fork 897
git tag
nulltoken edited this page May 25, 2011
·
8 revisions
$ git tag
using (var repo = new Repository("path/to/your/repo"))
{
foreach (Tag t in repo.Tags)
{
Console.WriteLine(t.Name);
}
}
$ git tag -n -l myTag
using (var repo = new Repository("path/to/your/repo"))
{
Tag t = repo.Tags["your-tag-name"];
Console.WriteLine(t.IsAnnotated ? t.Annotation.Message : ((Commit) t.Target).MessageShort);
}
$ git tag a-nice-tag-name
using (var repo = new Repository("path/to/your/repo"))
{
Tag t = repo.ApplyTag("a-nice-tag-name");
}