go-git icon indicating copy to clipboard operation
go-git copied to clipboard

Question: How to update all local branches in a bare repository?

Open trusch opened this issue 6 years ago • 1 comments

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?

trusch avatar Nov 12 '18 08:11 trusch

Hey, did you figure out a way to do this?

tazjin avatar Dec 20 '19 13:12 tazjin