Example #1
0
 public GitWrapper(string localPath, string remotePath, string branch, GitCredentials credentials)
 {
     this.localPath = localPath;
     this.Credentials = credentials;
     this.remotePath = remotePath;
     gitCmd = new GitCmdWrapper(@"C:\Program Files\Git\cmd\git.exe");
     Log.Message("Start initializing git repo");
     this.GitDirectory = localPath;
     if (DirectoryHelper.IsGitDir(localPath)) {
         GitInit(branch);
     }
     else {
         GitClone(branch);
         LFSPull();
     }
     Log.Message("End initializing git repo");
 }
Example #2
0
        public GitWrapper(string localPath, string remotePath, string branch, GitCredentials credentials)
        {
            this.localPath   = localPath;
            this.Credentials = credentials;
            this.remotePath  = remotePath;
            gitCmd           = new GitCmdWrapper(@"C:\Program Files\Git\cmd\git.exe");
            Log.Message("Start initializing git repo");
            GitDirectory = localPath;
            if (!DirectoryHelper.IsGitDir(localPath))
            {
                GitClone(branch);
            }
            GitInit(branch);
            Pull(branch);

            Log.Message("End initializing git repo");
        }