GitCommands.GitCommands.AddRemote C# (CSharp) Method

AddRemote() public static method

public static AddRemote ( string name, string path ) : string
name string
path string
return string
        public static string AddRemote(string name, string path)
        {
            var location = FixPath(path);

            if (string.IsNullOrEmpty(name))
                return "Please enter a name.";

            return
                string.IsNullOrEmpty(location)
                    ? RunCmd(Settings.GitCommand, string.Format("remote add \"{0}\" \"\"", name))
                    : RunCmd(Settings.GitCommand, string.Format("remote add \"{0}\" \"{1}\"", name, location));
        }
GitCommands