Here we take clearing the entire commit history of the main branch as the example.
- Switch to the main branch
| |
- Create a clean branch
| |
- Commit all files
| |
- Delete the main branch
| |
- Rename the new branch to main
| |
- Force push to the remote repository
| |
Here we take clearing the entire commit history of the main branch as the example.
| |
| |
| |
| |
| |
| |
