forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
git init
nulltoken edited this page May 17, 2011
·
4 revisions
$ git init /d/temp/rooted/path
Initialized empty Git repository in d:/temp/rooted/path/.git/
string rootedPath = Repository.Init("D:\temp\rooted\path");
Console.WriteLine(rootedPath); // "D:\temp\rooted\path\.git\\"
$ git init --bare /d/temp/rooted/path
Initialized empty Git repository in d:/temp/rooted/path/
string rootedPath = Repository.Init("D:\temp\rooted\path", true);
Console.WriteLine(rootedPath); // "D:\temp\rooted\path\\"
The relative path will be combined with the current working directory into an absolute path. Current working directory for the following code samples is "D:\Temp\".
$ git init relative/path
Initialized empty Git repository in d:/temp/relative/path/.git/
string rootedPath = Repository.Init("relative\path");
Console.WriteLine(rootedPath); // "D:\temp\relative\path\.git\\"
$ git init --bare relative/path
Initialized empty Git repository in d:/temp/relative/path/
string rootedPath = Repository.Init("relative\path", true);
Console.WriteLine(rootedPath); // "D:\temp\relative\path\\"