public static void MergeBranch(string branchName) { Debug.Log(RunGitCmd("merge " + branchName)); UnityGitHelper.CleanupUntracked(); AssetDatabase.Refresh(); }
void OnGUI() { if (!doCheckout) { bool currentBranchSelected = false; Color defaultColor = GUI.contentColor; selection = EditorGUILayout.Popup(selection, branches); if (branches[selection] == currentBranch) { currentBranchSelected = true; GUI.contentColor = Color.yellow; GUILayout.Label("You have the current branch selected..."); GUI.contentColor = defaultColor; } else { GUILayout.Label(""); } if (GUILayout.Button("Checkout Branch", GUILayout.MaxWidth(125))) { if (!currentBranchSelected) { doCheckout = true; } } } else { GUILayout.Label("Are you sure you want to checkout?"); GUILayout.Label("Any untracked files will be removed."); if (GUILayout.Button("Okay")) { GitSystem.CheckoutBranch(branches[selection]); Debug.Log("Current branch: " + GitSystem.GetCurrentBranch() + "\n"); // TODO: Kill untracked Unity project files using unity's delete system UnityGitHelper.CleanupUntracked(); Close(); } } }
public static void CleanupUntracked() { Debug.Log(GitSystem.RunGitCmd("clean -d -f")); UnityGitHelper.CleanupUntracked(GitSystem.GetUntrackedFilesList(false)); }
static void CleanupUntracked() { UnityGitHelper.CleanupUntracked(); }
static void CleanupUntrackedAndIgnored() { Debug.LogWarning("This feature partially implemented, it only cleared untracked, but not ignored files..."); UnityGitHelper.CleanupUntracked(); }