$ ./guess_the_languageGit
Git · hard · #16

What state is the repository in right after this?

$ git switch main
$ git merge --squash feat
Squash commit -- not updating HEAD
  1. Changes staged; no commit created yet
  2. One squashed commit is now on main
  3. A merge commit with two parents exists
  4. feat is rewritten into one commit
--squash applies the combined changes to the index without moving HEAD. You must run git commit, and the result has a single parent.
Play Git ▸