Skip to content

SourceForgeMirror

Brad Bebee edited this page Feb 13, 2020 · 1 revision

Setting up a mirror of the private git repository that can be pushed to the public SF git repository.

If you want to mirror a repository in another location, including getting updates from the original, you can clone a mirror and periodically push the changes.

# Make a bare mirrored clone of the repository
git clone --mirror https://github.com/SYSTAP/bigdata.git bigdata-sf-mirror
#
# Set the push location to your mirror
cd bigdata-sf-mirror
git remote set-url --push origin ssh://thompsonbry@git.code.sf.net/p/bigdata/git

As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror. To update your mirror, fetch updates and push, which could be automated by running a cron job.

git fetch -p origin
git push --mirror

See duplicating a repository

Clone this wiki locally
You can’t perform that action at this time.