Skip to content

Instantly share code, notes, and snippets.

@iTrauco
Created June 27, 2025 00:41
Show Gist options
  • Save iTrauco/b4b2813b3981a4e639f1ae8e6ccb1601 to your computer and use it in GitHub Desktop.
Save iTrauco/b4b2813b3981a4e639f1ae8e6ccb1601 to your computer and use it in GitHub Desktop.

1. Switch back to develop

git checkout develop

2. Delete the old local rebuild branch

git branch -D clean-rebuild-no-01

3. Create a new clean rebuild branch from develop

git checkout -b clean-rebuild-no-01

4. Remove all tracked files (except .git)

git rm -r --cached . rm -rf *

5. (Optional) Create starter files

echo "# Clean Rebuild No. 01" > README.md touch .gitignore

6. Stage and commit the reset

git add . git commit -m "feat: clean rebuild no. 01 from develop"

7. Push the branch to origin

git push -u origin clean-rebuild-no-01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment