Skip to content

Instantly share code, notes, and snippets.

@sthagen
Created November 24, 2021 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sthagen/7827a4375796420444bda1503a6d7f18 to your computer and use it in GitHub Desktop.
Save sthagen/7827a4375796420444bda1503a6d7f18 to your computer and use it in GitHub Desktop.
git local clone follow of remote branch change
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