Created
September 20, 2023 13:23
-
-
Save HanjoStudy/866cbdcee74cb7009695090063a62206 to your computer and use it in GitHub Desktop.
Github reset before prod
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
# Create a new orphan branch | |
git checkout --orphan temp_branch | |
# Add files to new branch | |
git add -A | |
git commit -m "Initial commit" | |
# Delete original master branch | |
git branch -D master | |
# Rename orphan branch | |
git branch -m master | |
# Push changes (if necessary) | |
git push -f origin master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment