NAME

Git::Native::Branch - A libgit2 branch (thin wrapper over git_reference)

VERSION

version 0.003

SYNOPSIS

my $b = $repo->branch('main');
say $b->name;          # 'main'
say $b->refname;       # 'refs/heads/main'
say $b->target->hex;   # commit OID
$b->rename('trunk');

DESCRIPTION

Wraps a libgit2 branch (which is really a git_reference under refs/heads/* or refs/remotes/*). Constructed by "branch" in Git::Native::Repository and "branches" in Git::Native::Repository.

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-git-native/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.