Skip to content

Instantly share code, notes, and snippets.

@soyfrien
Created April 7, 2022 07:41
Show Gist options
  • Save soyfrien/4dd81d645754c2dce914135184c36d07 to your computer and use it in GitHub Desktop.
Save soyfrien/4dd81d645754c2dce914135184c36d07 to your computer and use it in GitHub Desktop.
Update local clone when renaming branch (git cli).
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment