Git local mirror
I have a remote git repository with big history and slow connection channel. Where are some local users, and slow push/pull after big commits or cloning from scratch for new users are big problems, now. I want to create local mirror of it. Local changes must be committed to local repo, and sync with remote in background. I understand that this problem is in demand, but I have not found any solution yet (I am not admin of remote repo, I just try to simplify local work with it).
Since you write in the comments that the people behind the slow connection would be doing most of the work, I would suggest you setup the slow remote site to be a mirror of your local repo you would commit against.
First make a bare clone of slow remote on a local server
$ git clone --bare git://slow/repo.git
You local people should now only commit to that clone, not the slow remote.
Then set up a cron job or something similar to push changes in your local repo to the slow site with
$ git push origin --mirror
By using --mirror
you tell git to push all branches and tags.
You should be able to make shallow clones with
git clone --depth=20 url-to-your-repo some-path
This should allow you to not bother with most of the history.
链接地址: http://www.djcxy.com/p/61540.html上一篇: 由于对象的当前状态,操作无效。 在C#中
下一篇: Git本地镜像