Importing Handmade Hero into Git

For everyone who wants to use git to follow along with Casey and do their own stuff here is a bash script to import the new files from each day into a git repository.

Put this script in an empty folder, create a subdirectory "source" where you put all the unpacked daily zip files and run the script inside that folder. It will create the git repository "HandmadeHero" there with one commit and tag for each day. When you get new daily source code files put them in the source folder and run the script again - it will only import the days that are not yet in git.

Couldn't attach the file. Here it is as gist: https://gist.github.com/5sw/ae6b72cd74137017712f

Edited by Sven on
Remember not to post the code to a public repository!

The code is not open source yet (and won't be until Casey releases it which he has said he plans on doing 2 years after the *release* of the game).

Only private repos or on private servers. Even than be careful so the code doesn't leak out to the net.

Edited by Lance T Hildebrand on Reason: Clarity
Search 'HandmadeHero' on GitHub. There's like 10+ repos publicly accessible already.

Legally, if you stumble across someone else's public repo, read their transcribed code of Caseys' lessons not realising the original source is not public domain, would you be ok?

I think some of those 10+ repo don't even mention Casey or what the code is for. Affectively everything Casey's doing is just floating out their in the public domain.

UPDATE: The most up-to-date public repo appears to be https://github.com/RyanRothweiler/HandmadeHero, which at time of this post is at Day 33

Edited by Tribuadore on
I mostly wanted to give a notice (since it was not included in the OP) so that people hopefully see it and think about it based off a very good suggestion about how to get it up in a git repo.

While it is sadly inevitable, publicly posting the code is still illegal, and also disrespectful.

Casey could easily ask for those repos to be removed, and it could also be a violation of any given services TOS which could lead to a ban from that service.
Might be worth messaging the owners of the repositories and mentioning something like bitbucket.org. It offers free private repos and you can even 1 click import the github repo, it even keeps the commit history.
bitbucket is really nice and other than github is the place to go for git in the cloud.

Another cool thing about bitbucket is you get private repos for free where github you need to pay monthly for that feature.
Of course my script isn't there to violate the terms of the license by uploading this to some public repository. I think this is so obvious that it's not even worth mentioning. Anyways, the beauty of Git is that you don't need a remote repository or server, you can do everything locally.

Another thing about this script: All the code from Casey goes to the "master" branch if the script sets up your repository. So you have to remember to first switch to the master branch before running it again to import more days if you are working on a different branch.