3 ms·
To go one step further you can add an HTTP redirect for /info/refs to direct to wherever the GIT repo is hosted. For example, if hosting with gitlab pages or on
by hhdave 6y ago
To go one step further you can add an HTTP redirect for /info/refs to direct to wherever the GIT repo is hosted. For example, if hosting with gitlab pages or on Netlify you can put in a file called _redirects containing something like:-
/info/refs service=:service https://gitlab.com/<user>/<project>.git/info/refs?service=:service https://gitlab.com/<user>/<project>.git/info/refs?service=:s... 301
Then if your website is at https://example.com https://example.com someone can just 'git clone https://example.com https://example.com'. They can periodically do 'git pull origin master' and you can also push changes that way. There's no problem moving to a different git repo provider (github/gitlab/whatever).
- hhdave 6y agoWell, this works if publishing via Netlify anyway. Gitlab doesn't like the query parameters, but it also errors with 'no domain-level redirects to outside sites'