I have a repo that is a bare clone of a github repo:
git clone --bare git@github.com:PabloSerbo/maiden.git
A number of developers clone that repo and push back to it.
Another developer has committed directly to the github repo.
I would like to know how to get the changes on github back into the bare repo for the other developers to pull from.
I have tried:
git fetch origin
Which seems to fetch to:
remotes/origin/master
But I can’t get local head to have the changes.
The closest question I can find is this:
This suggests mirroring, but I would like to know if there is a way to achieve this without the need to mirror.
clone the bare repo yourself. This will have origin pointing to that. Now add the github repo as ‘github’ remote. You can now fetch the branches and tags from github and in turn push them to origin.
Hope this helps.