todo-git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
todo-git [2018/11/16 08:59] – [Changing a local branch without regard to remote branch] dblume | todo-git [2021/11/02 21:48] – dblume | ||
---|---|---|---|
Line 100: | Line 100: | ||
====== Renaming branches ====== | ====== Renaming branches ====== | ||
+ | |||
+ | ===== Updating both local and remote repos ===== | ||
To rename a remote branch: | To rename a remote branch: | ||
Line 141: | Line 143: | ||
</ | </ | ||
+ | ===== Updating a local repo after remote' | ||
+ | <code bash> | ||
+ | git branch -m master main | ||
+ | git fetch origin | ||
+ | git branch -u origin/main main | ||
+ | git remote set-head origin -a | ||
+ | </ | ||
====== git at dlma.com ====== | ====== git at dlma.com ====== |