Migrate Hugo blog repository (but delete all Git commits)
Page content
My real case
- Migrate repository from BitBucket to GitHub.
- I could delete Commit histories.
What I’ve done
- Update
.gitignore. - Delete
docsdirectory. - Update netlify.toml
[build]
publish = "docs"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.87.0"
rm -rf data #old dir structurerm -rf .gitrm -rf theme/mainroadgit initgit submodule add git@github.com:Vimux/Mainroad.git themes/mainroadgit config --global user.name atlex00git config --global user.email ...git commitgit push origin master --force