1

Goal

As part of a tool I'm building, I am exporting a GitHub repository using lib2gitsharp.

I'd like to pull the repository, all tags, and all origin branches at the time of archiving, to ensure they're preserved.

Progress So Far

  • ✔ I am able to clone the repository and its tags
  • ❌I am unable to bring down the branches from origin into the local repo.

Question

Conceptually within libgit2sharp, what needs to be done in order to retrieve a branch from the remote origin and ensure that it is available locally?

I think that it's a combination of a fetch and a merge, but I have had no such luck combining those operations for a successful outcome.

SeanKilleen
  • 8,809
  • 17
  • 80
  • 133
  • I am seeing this may be a duplicate of https://stackoverflow.com/questions/23337677/libgitsharp-checkout-remote-branch Since that answer is from several years ago, I will confirm whether or not it is accurate still. If it is, I'll redirect there and close this question. – SeanKilleen Aug 12 '20 at 15:51
  • Update: the solution there is still relevant, so I'm voting to close. Sorry, I'd missed it in my initial search. – SeanKilleen Aug 12 '20 at 19:10
  • @DanielWiddis that is the link I reference in my comment above. I've voted to close this topic as linked to that. – SeanKilleen Aug 13 '20 at 03:04
  • 1
    that comment was auto-generated by my close vote and will be auto-deleted if the question is closed. – Daniel Widdis Aug 13 '20 at 03:07

0 Answers0