Skip to content

Instantly share code, notes, and snippets.

@mitchwongho
Last active May 7, 2021 08:58
Show Gist options
  • Save mitchwongho/99159cd6bc03a20d8a6d8ef4d4e9b266 to your computer and use it in GitHub Desktop.
Save mitchwongho/99159cd6bc03a20d8a6d8ef4d4e9b266 to your computer and use it in GitHub Desktop.
CodeCommit - Git Checkout - Detached HEAD
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Note: switching to 'origin/xxxxxxxxxx'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment