Exemplo n.º 1
0
        private void button27_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Name of remote to show detail:";
            input.ShowDialog();
            string remote = input.Result.Trim();


            doCommand("remote show " + remote);
        }
Exemplo n.º 2
0
        private void button34_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Name of remote to pull from:";
            input.ShowDialog();
            string remote = input.Result.Trim();


            doCommand("pull " + remote);
        }
Exemplo n.º 3
0
        private void btnMergeBranch_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Merge current branch with which branch?";

            input.ShowDialog();

            string branchName = input.Result;

            doCommand("merge " + branchName);
        }
Exemplo n.º 4
0
        private void btnDeleteBranch_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Which branch to delete?";

            input.ShowDialog();

            string branchName = input.Result;

            doCommand("branch -D " + branchName);
        }
Exemplo n.º 5
0
        private void btnChangeBranches_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Which branch to switch to?";

            input.ShowDialog();

            string branchName = input.Result;

            doCommand("checkout " + branchName);
        }
Exemplo n.º 6
0
        private void button6_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Filename to commit";

            input.ShowDialog();

            string file = input.Result;

            doCommand("add \"" + file + "\"");
        }
Exemplo n.º 7
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Please provide a comment for this commit:";

            input.ShowDialog();

            string comment = input.Result;

            doCommand("commit -m \"" + comment + "\"");
        }
Exemplo n.º 8
0
        private void button21_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Which file do you wish to untrack?";

            input.ShowDialog();

            string file = input.Result.Trim();

            doCommand("rm --cached \"" + file + "\"");
        }
Exemplo n.º 9
0
        private void button22_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Updated comment:";

            input.ShowDialog();

            string comment = input.Result.Trim();

            doCommand("commit --amend -m \"" + comment + "\"");
        }
Exemplo n.º 10
0
        private void button20_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Which stash do you want to apply?";

            input.ShowDialog();

            string stash = input.Result;

            doCommand("stash pop " + stash);
        }
Exemplo n.º 11
0
        private void btnCreateBranch_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Please provide a new branch name:";

            input.ShowDialog();

            string branchName = input.Result;

            doCommand("checkout -b " + branchName);
        }
Exemplo n.º 12
0
        private void button12_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Tag name";

            input.ShowDialog();

            string tag = input.Result;

            doCommand("tag " + tag);
        }
Exemplo n.º 13
0
        private void button11_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "SHA1 of commit to check out";

            input.ShowDialog();

            string sha1 = input.Result;

            doCommand("checkout " + sha1);
        }
Exemplo n.º 14
0
        private void button14_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Which file do you want to get last commit";

            input.ShowDialog();

            string sha1 = input.Result.Trim();

            doCommand("checkout -- \"" + sha1 + "\"");
            //doCommand("status");
        }
Exemplo n.º 15
0
        private void button9_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Filename to unstage";

            input.ShowDialog();

            string file = input.Result.Trim();

            doCommand("reset HEAD \"" + file + "\"");
            doCommand("status");
        }
Exemplo n.º 16
0
        private void button33_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Local branch:";
            input.ShowDialog();
            string local = input.Result.Trim();

            input        = new InputForm();
            input.Prompt = "Remote branch (remotename/branch):";
            input.ShowDialog();
            string remote = input.Result.Trim();


            doCommand("diff " + local + " " + remote);
        }
Exemplo n.º 17
0
        private void button28_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Old short name for remote:";
            input.ShowDialog();
            string oldname = input.Result.Trim();

            input        = new InputForm();
            input.Prompt = "New short name for remote:";
            input.ShowDialog();
            string newname = input.Result.Trim();


            doCommand("remote rename " + oldname + " " + newname);
        }
Exemplo n.º 18
0
        private void button24_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Short name for remote:";
            input.ShowDialog();
            string shortname = input.Result.Trim();

            input        = new InputForm();
            input.Prompt = "URL for remote:";
            input.ShowDialog();
            string url = input.Result.Trim();


            doCommand("remote add " + shortname + " " + url);
        }
Exemplo n.º 19
0
        private void button30_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "URL of remote repository:";
            input.ShowDialog();
            string remote = input.Result.Trim();

            FolderBrowserDialog fDialog = new FolderBrowserDialog();
            DialogResult        result  = fDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                lblWorkingDirectory.Text = fDialog.SelectedPath;

                doCommand("clone " + remote + " \"" + lblWorkingDirectory.Text + "\"");
            }
        }
Exemplo n.º 20
0
        private void button2_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm();

            input.Prompt = "Revert to which commit?  (sha1)";

            input.ShowDialog();

            string sha1 = input.Result.Trim();

            if (radioButton1.Checked)
            {
                //doCommand("revert " + sha1);
                doCommand("revert --no-commit " + sha1 + "..HEAD");
                doCommand("commit -m \"revert from " + sha1 + "\"");
            }
            else
            {
                doCommand("reset --hard " + sha1);
            }
        }