Mirror a git repository by pulling?

First create a mirror with git clone –mirror git@somewhere.com:repo.git then setup a cron job like this: */1 * * * * gitbackup cd /backup/repo.git && git fetch -q –tags This will backup the changesets every minute. Maybe you want to do this less frequently.

! [remote rejected] errors after mirroring a git repository

As mentioned in this issue, that happens when you mirror a GitHub repo which has pull requests made to it. The refs beginning ‘refs/pull‘ are synthetic read-only refs created by GitHub – you can’t update (and therefore ‘clean’) them, because they reflect branches that may well actually come from other repositories – ones that submitted … Read more

Mirroring from GitLab to GitHub

GitLab has now an option to do this from the UI, go to the Settings->Repository of your repo: https://gitlab.com/yourUserNameInGitLab/yourRepoName/settings/repository Then find the option “Mirror a repository” and click on expand. What you want to do is choose the “Push” mirror direction and fill this URL: https://yourUserNameInGitHub@github.com/yourUserNameInGitHub/yourRepoName.git In the password field, you have to use a … Read more

wget recursive download, but I don’t want to follow all links

You might also try HTTrack which has, IMO, more flexible and intuitive include/exclude logic. Something like this… httrack “https://example.com” -O ExampleMirrorDirectory \ “-*” \ “+https://example.com/images/*” \ “-*.swf” The rules will be applied in order, and will override previous rules… Exclude everything But include https://example.com/images/* But exclude anything ending in swf