Skip to content

Commit 6bf8371

Browse files
authored
One more step for updating your local repo after a rename
Plus an optional follow-up / housekeeping command.
1 parent c834616 commit 6bf8371

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

content/github/administering-a-repository/renaming-a-branch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ From the local clone of the repository on a computer, run the following commands
3838
$ git branch -m <em>OLD-BRANCH-NAME</em> <em>NEW-BRANCH-NAME</em>
3939
$ git fetch origin
4040
$ git branch -u origin/<em>NEW-BRANCH-NAME</em> <em>NEW-BRANCH-NAME</em>
41+
$ git remote set-head origin -a
42+
```
43+
44+
Optionally, clean up your remote branch info:
45+
```
46+
$ git remote prune origin
4147
```

0 commit comments

Comments
 (0)