public static void DisplayGitCommands(GitLinkOnDisk gitDirectory) { bool hasUrl = gitDirectory.HasUrl(); if (gitDirectory.Exist()) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Add -a")) { QuickGit.Add(gitDirectory.GetDirectoryPath()); } if (GUILayout.Button("Commit")) { QuickGit.Commit(gitDirectory.GetDirectoryPath()); } if (hasUrl && GUILayout.Button("Pull")) { QuickGit.Pull(gitDirectory.GetDirectoryPath()); } if (hasUrl && GUILayout.Button("Push")) { QuickGit.Push(gitDirectory.GetDirectoryPath()); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (hasUrl && GUILayout.Button("Add>Commit>Pull")) { QuickGit.AddCommitAndPush(gitDirectory.GetDirectoryPath()); } if (hasUrl && GUILayout.Button("A>C>Pull + A>C>push")) { QuickGit.PullPushWithAddAndCommit(gitDirectory.GetDirectoryPath()); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Open explorer")) { Application.OpenURL(gitDirectory.GetDirectoryPath()); } if (GUILayout.Button("See Status")) { QuickGit.OpenCmd(gitDirectory.GetDirectoryPath()); } if (hasUrl && GUILayout.Button("Go to Server")) { Application.OpenURL(gitDirectory.GetUrl()); } GUILayout.EndHorizontal(); } }