Forks on forks on forks

One of the best parts of GitHub is forking. See a repository that you want to use or modify? Just fork it and you’ve got your own copy to play around with.

However, GitHub will only let you clone a repo once. You can’t fork your own repos either.

So, if I wanted to create a new project starting with my derptype boilerplate, I’d have to initialize a new repo on my machine, create a gh-pages branch, download / unzip / copy over the html/css files, and deploy it back to GitHub. That’s a lot of work just to create a copy of my own code.

Which is why you need to buy Trent Oswald a beer. He wrote a command line utility for copying repos. Fittingly, it’s called Mirror.

There are a few advantages of cloning vs. creating a new repo & copying over the source files:

I used Mirror to clone derptype2 from my original derptype repo — mirror nealrs/derptype to nealrs/derptype2 -c

FYI, to use this compact form of the CLI, you have to create a personal GitHub token with repo permissions and set a couple environment variables. Otherwise, you must specify -u and -t params every time. Not a big deal, but I’m just saying.

Comments :)
2017 Neal Shyam