Question: where are local git commits stored?
Answer: Git stores all references under the . git/refs folder and branches are stored in the directory . git/refs/heads . Since branch is a simple text file we can just create a file with the contents of a commit hash.