= FileManager.default try fm.createDirectory(atPath: ".git/objects", withIntermediateDirectories: true) try fm.createDirectory(atPath: ".git/refs/heads", withIntermediateDirectories: true) let headPath = ".git/HEAD" let headContent = "ref: refs/heads/main\n" try headContent.write(toFile: headPath, atomically: true, encoding: .utf8) print("Initialized empty SwiftGit repository in .git/") }