class Rugged::Branch

def ==(other)

def ==(other)
  other.instance_of?(Rugged::Branch) &&
    other.canonical_name == self.canonical_name
end

def remote


it tracks or nil if there is no tracking branch.
In case of local branch, it returns the remote of the branch
If the branch is remote returns the remote it belongs to.

Get the remote the branch belongs to.
def remote
  remote_name = self.remote_name
  @owner.remotes[remote_name] if remote_name
end