Skip to content

Commit 573dde3

Browse files
authored
Merge pull request #18770 from github/repo-sync
repo sync
2 parents 031843b + 3ecbdd4 commit 573dde3

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, run the following command to remove tracking references to the old branch name.
45+
```
46+
$ git remote prune origin
4147
```

0 commit comments

Comments
 (0)