homebrew-file icon indicating copy to clipboard operation
homebrew-file copied to clipboard

master -> main

Open rcmdnk opened this issue 2 years ago • 2 comments

rcmdnk avatar Feb 25 '23 12:02 rcmdnk

To change local repository:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

rcmdnk avatar Feb 25 '23 12:02 rcmdnk

At Homebrew, it shows an error at brew update after changing the repository:

$ brew update

[ERROR] fatal: couldn't find remote ref refs/heads/master
Error: Fetching /opt/homebrew/Library/Taps/rcmdnk/homebrew-file failed!
Error: Some taps failed to update!
The following taps can not read their remote branches:
  rcmdnk/file
This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`

This can be fixed by brew tap --repair:

$ brew tap --repair
From https://github.com/rcmdnk/homebrew-file
 - [deleted]         (none)     -> origin/master
   (refs/remotes/origin/HEAD has become dangling)
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 29 (delta 17), reused 29 (delta 17), pack-reused 0
Unpacking objects: 100% (29/29), 13.92 KiB | 431.00 KiB/s, done.
   6f7e92f..a290028  coverage                          -> origin/coverage
 * [new branch]      main                              -> origin/main
==> rcmdnk/file: changed default branch name from master to main!

rcmdnk avatar Feb 25 '23 14:02 rcmdnk