Re:A list of cool features of Git and GitHub
by niutech on Sunday January 18, 2015 @01:14PM
(#8908235)
Any way how to automatically mirror an external Git repo to GitHub? Any webhooks for that?
[ Parent
| on HN ]
Re:A list of cool features of Git and GitHub
by talles on Sunday January 18, 2015 @02:08PM
(#8908452)
https://help.github.com/articles/about-github-mirrors/
tldr; you have to set the hook yourself
Re:A list of cool features of Git and GitHub
by bjeanes on Sunday January 18, 2015 @05:55PM
(#8909323)
The feature does or did exist, but hidden. The early versions of GitHub Enterprise (called GitHub FI) exposed this and it can be seen in action in some places (e.g.: https://github.com/ghc; look at the "mirrored from" subtitles). I really wish GitHub would expose that feature publicly, though. The post-receive advice they give only works if you have full access to the master repo and misses out on recording the "this is a mirror" piece of metadata on the repository, which is useful for people who might try to open PRs etc
Re:A list of cool features of Git and GitHub
by allendoerfer on Sunday January 18, 2015 @01:43PM
(#8908334)
The point of git is, that you do not need to do this. Just push.
Re:A list of cool features of Git and GitHub
by ekimekim on Monday January 19, 2015 @01:53AM
(#8910672)
There's a slight difference between a git push and a full mirror operation. A git push only synchronises the current branch. Even git push --all doesn't necessarily push all reachable commits - tags, other named refs (eg. stash), the state of the reflog...
Re:A list of cool features of Git and GitHub
by seanp2k2 on Monday January 19, 2015 @12:12AM
(#8910443)
It's somewhat useful as poor man's backup, since forgetting to push to the other remote would be a pretty human thing to do. I guess you could do some kind of bash alias to push both remotes, but that would also assume that both are available from your network location (not sure if Git can have n remotes with one push alias).
Re:A list of cool features of Git and GitHub
by returnofthejedi on Sunday January 18, 2015 @01:36PM
(#8908308)
Can't we download and then push to github repo?