User Tools

Site Tools


todo-git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
todo-git [2021/05/21 00:04]
127.0.0.1 external edit
todo-git [2021/11/14 00:23]
dblume [Updating a local repo after remote's already renamed its branch]
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:
 </code> </code>
  
 +===== Updating a local repo after remote's already renamed its branch =====
  
 +<code bash>
 +git branch -m master main
 +git fetch --all --prune
 +git branch -u origin/main main
 +git remote set-head origin -a
 +</code>
  
 ====== git at dlma.com ====== ====== git at dlma.com ======
todo-git.txt ยท Last modified: 2021/11/14 00:23 by dblume