$ ./guess_the_languageGit
Git · hard · #12

What is special about the commit just created?

$ git switch --orphan gh-pages
$ git add index.html
$ git commit -m "Site"
  1. It is a merge with main
  2. It has two parent commits
  3. It has no parent commit
  4. It is shared with main
--orphan starts a branch with no history, so its first commit is a root commit, unrelated to any other branch.
Play Git ▸