Skip to content

Instantly share code, notes, and snippets.

console.log(1);
setTimeout(() => console.log(2), 0);
Promise.resolve().then(() => console.log(3));
console.log(4);

Local git repository without porcelain commands

How to create local git repository without git init?

mkdir -p .git/objects .git/refs
echo "ref: refs/heads/master" > .git/HEAD  # instead of 'master' here can be any branch name

How to verify if it is enough?