Created
August 25, 2024 13:39
-
-
Save serrasqueiro/38e57e9fa01696312eec3f8567f597f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to kill the master branch in git | |
# replacing the master branch name in remote server | |
henrique@ludo:~/public> git push origin main:master -f | |
# then in a clean repo: | |
git push origin --delete master | |
At server, at "bare" repo (created formerly with 'git init --bare'): | |
- do `git branch` and see where '*' (star) is. | |
- the HEAD then should refer to "ref: refs/heads/main", | |
- instead of ref: refs/heads/master. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment