@@ -34,6 +34,18 @@ public static Branch Add(this BranchCollection branches, string name, Commit com
34
34
return branches . Add ( name , commit . Sha , allowOverwrite ) ;
35
35
}
36
36
37
+ /// <summary>
38
+ /// Create a new local branch with the specified name
39
+ /// </summary>
40
+ /// <param name="branches">The <see cref="BranchCollection"/> being worked with.</param>
41
+ /// <param name="name">The name of the branch.</param>
42
+ /// <param name="committish">Revparse spec for the target commit.</param>
43
+ /// <returns>A new <see cref="Branch"/>.</returns>
44
+ public static Branch Add ( this BranchCollection branches , string name , string committish )
45
+ {
46
+ return branches . Add ( name , committish , false ) ;
47
+ }
48
+
37
49
/// <summary>
38
50
/// Deletes the branch with the specified name.
39
51
/// </summary>
@@ -66,6 +78,18 @@ public static void Remove(this BranchCollection branches, string name, bool isRe
66
78
branches . Remove ( branch ) ;
67
79
}
68
80
81
+ /// <summary>
82
+ /// Rename an existing local branch
83
+ /// </summary>
84
+ /// <param name="branch">The current local branch.</param>
85
+ /// <param name="newName">The new name the existing branch should bear.</param>
86
+ /// <param name="branches">The <see cref="BranchCollection"/> being worked with.</param>
87
+ /// <returns>A new <see cref="Branch"/>.</returns>
88
+ public static Branch Rename ( this BranchCollection branches , Branch branch , string newName )
89
+ {
90
+ return branches . Rename ( branch , newName , false ) ;
91
+ }
92
+
69
93
/// <summary>
70
94
/// Rename an existing local branch, using the default reflog message
71
95
/// </summary>
0 commit comments