public void GetBranchTest() { GitRepository.Init(tempFolder); File.WriteAllLines(tempFilePath, lines); GitRepository tracker = new GitRepository(tempFolder); Assert.AreEqual("master", tracker.CurrentBranch); tracker.StageFile(tempFile); Assert.AreEqual("master", tracker.CurrentBranch); tracker.Commit("test message"); Assert.AreEqual("master", tracker.CurrentBranch); tempFile = tempFile.Replace("test", "TEST"); File.WriteAllText(tempFilePath, "changed text"); tracker.CheckOutBranch("dev", true); Assert.AreEqual("dev", tracker.CurrentBranch); }