Last active
May 8, 2026 14:51
-
-
Save rafaelmaeuer/f10c48624498b436ff2370b77f79d14b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Backup of Main (optional) | |
| git fetch --all --tags | |
| git checkout main | |
| git pull | |
| git branch main-backup-$(date +%Y%m%d) | |
| git push origin main-backup-$(date +%Y%m%d) | |
| # Reset Main to dev: | |
| git checkout main | |
| git reset --hard origin/dev | |
| git push --force-with-lease origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment