go-git
go-git copied to clipboard
Question: How to update all local branches in a bare repository?
I want to update all local branches in a bare repository. My usecase is to have a git-cache between the user and the remote repository.
When the user issues a Fetch request against the cache server, the cache first tries to fetch changes from the upstream repository and then it should update all its local tracking branches before awnsering the original user-request.
Fetching on the cache server works fine, but I dont know (and dont see something in the api) on how to update the local branches.
git show-ref clearly shows me that the cache-server successfully fetched the changes, but did not fast-forward any of the tracking branches.
How can I achieve this?
Hey, did you figure out a way to do this?