-
Notifications
You must be signed in to change notification settings - Fork 889
git symbolic ref
KindDragon edited this page Feb 27, 2013
·
2 revisions
$ git symbolic-ref i-track-for-a-living refs/heads/master
using (var repo = new Repository("path/to/your/repo"))
{
var symRef = repo.Refs.Create("i-track-for-a-living", "refs/heads/master");
}
$ git symbolic-ref i-track-for-a-living refs/heads/vNext
using (var repo = new Repository("path/to/your/repo"))
{
var symRef = repo.Refs.UpdateTarget("i-track-for-a-living", "refs/heads/vNext");
}
$ git symbolic-ref HEAD
using (var repo = new Repository("path/to/your/repo"))
{
Console.WriteLine(repo.Head.CanonicalName));
}
$ git symbolic-ref i-track-for-a-living
using (var repo = new Repository("path/to/your/repo"))
{
Console.WriteLine(repo.Refs["i-track-for-a-living"].TargetIdentifier);
}