GitSharp/Examples
From eqqon
(Difference between revisions)
m (→Using git commands) |
m (→Init) |
||
Line 7: | Line 7: | ||
Initializing a new repository with options | Initializing a new repository with options | ||
{{code|<nowiki> | {{code|<nowiki> | ||
- | var cmd = new Git.InitCommand("path/to/repo") { Quiet=false, Bare=true };<br> | + | var cmd = new Git.InitCommand("path/to/repo") { Quiet=false, Bare=true };</nowiki><br> |
cmd.Execute(); | cmd.Execute(); | ||
- | + | }} |
Revision as of 06:57, 30 September 2009
Using git commands
Init
Initializing a new repository in the current directory (if GID_DIR environment variable is not set)
Git.Commands.Init();
Initializing a new repository in the specified location
Git.Commands.Init("path/to/repo");
Initializing a new repository with options
var cmd = new Git.InitCommand("path/to/repo") { Quiet=false, Bare=true };
cmd.Execute();