Ggit.Branch
Description: Reference for Ggit.Branch

### Class

# GgitBranch

#### Description [src]

    class Ggit.Branch : Ggit.Ref {
      parent_instance: GgitRef
    }

Represents a branch object.

#### Hierarchy

#### Ancestors

- GgitRef
- GgitNative
- GgitObjectFactoryBase
- GObject

#### Instance methods

###### ggit_branch_delete

Deletes an existing branch reference.

###### ggit_branch_get_name

Gets the name of the given local or remote branch.

###### ggit_branch_get_upstream

Gets the reference supporting the remote tracking branch, given a local branch reference.

###### ggit_branch_is_head

Determines if the current local branch is pointed at by HEAD.

###### ggit_branch_move

Moves/renames an existing branch reference.

###### ggit_branch_set_upstream

Sets the upstream branch, for a given local branch reference.

##### Methods inherited from GgitRef (20)

###### ggit_ref_delete

Deletes `ref`.

###### ggit_ref_delete_log

Deletes the log for `ref`, on error `error` is set.

###### ggit_ref_get_log

Gets the `GgitReflog` for `ref`. The reflog will be created if it doesn’t exist yet.

###### ggit_ref_get_name

Gets the full name of `ref`.

###### ggit_ref_get_owner

Gets the repository where `ref` resides.

###### ggit_ref_get_reference_type

Gets the type of `ref`. Either direct (#GGIT_REF_OID) or symbolic (#GGIT_REF_SYMBOLIC).

###### ggit_ref_get_shorthand

Gets the shorthand name of `ref`.

###### ggit_ref_get_symbolic_target

Get full name to the reference pointed to by a symbolic reference. Only available if the reference is symbolic.

###### ggit_ref_get_target

Get the OID pointed to by a direct reference. Only available if the reference is direct (i.e. an object id reference, not a symbolic one).

###### ggit_ref_has_log

Get whether `ref` has an existing log.

###### ggit_ref_is_branch

Check whether the reference is a branch.

###### ggit_ref_is_note

Check whether the reference is a note.

###### ggit_ref_is_remote

Check whether the reference is a remote.

###### ggit_ref_is_tag

Check whether the reference is a tag.

###### ggit_ref_lookup

Convenient method to resolve a reference to an object.

###### ggit_ref_rename

Rename an existing reference.

###### ggit_ref_resolve

Resolves a symbolic reference.

###### ggit_ref_set_symbolic_target

Create a new reference with the same name as the given reference but a different symbolic target. The reference must be a symbolic reference, otherwise this will fail.

###### ggit_ref_set_target

Create a new reference with the same name as the given reference but a different OID target. The reference must be a direct reference, otherwise this will fail.

###### ggit_ref_to_string

Get a string representation of the ref.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

##### Properties inherited from GgitNative (1)

###### Ggit.Native:native

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GgitBranchClass {
      /* no available fields */
    }

No description available.