File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ func (g *Git) Fetch(opts ...string) *command.Model {
4747 return g .command (args ... )
4848}
4949
50- // Checkout switchs branches or restore working tree files.
50+ // Checkout switches branches or restore working tree files.
5151// Arg can be a commit hash, a branch or a tag.
5252func (g * Git ) Checkout (arg string ) * command.Model {
5353 return g .command ("checkout" , arg )
@@ -173,3 +173,11 @@ func (g *Git) SparseCheckoutSet(opts ...string) *command.Model {
173173 args = append (args , opts ... )
174174 return g .command (args ... )
175175}
176+
177+ // UpdateRef updates the object name stored in a ref safely.
178+ // With -d flag, it deletes the named <ref>.
179+ func (g * Git ) UpdateRef (opts ... string ) * command.Model {
180+ args := []string {"update-ref" }
181+ args = append (args , opts ... )
182+ return g .command (args ... )
183+ }
You can’t perform that action at this time.
0 commit comments