import os import nimgit if paramCount() == 0: echo "No git-repo given." quit(QuitFailure) discard git_libgit2_init() try: let gitRepository = openGitRepository(paramStr(1)) for branch in gitRepository.branches(branchAll): if branch.isLocalBranch(): echo "local: " & branch.getBranchName() if branch.isRemoteBranch(): echo "remote: " & branch.getBranchName() free(branch) free(gitRepository) except: echo "Error:\n", getCurrentExceptionMsg()