How to?

Fix when remote default branch is renamed

Apr 21, 2024
softwares-and-toolsgitbranch
1 Minutes
26 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

Fix when remote default branch is renamed

ref: github tip

1
git branch -m <old> <new>
2
git fetch origin
3
git branch -u origin/<new> <new>
4
git remote set-head origin -a
Article title:Fix when remote default branch is renamed
Article author:Julyfun
Release time:Apr 21, 2024
Copyright 2026
Sitemap