The folly is that if you did upload to github, they would have wanted to see steady commit history as well, which would have given away how much time you actually worked on it.
The key is lying because you already had a similar code base to use, most likely from interviewing so much you'd seen it before.
I actually didn't get a job for over-commiting. I hit a point where things were working, and wanted to be able to git-diff in VS Code, and they declined my application due to that.
I was going to push as well, as I wanted to make sure that was set up right, but they associated that with 'pushing untested code to production'
The key is lying because you already had a similar code base to use, most likely from interviewing so much you'd seen it before.