Skip to content

Git

Clear or Init, Push Origin

shell
rm -rf .git
git init
vi README.md
vi .gitignore
git add README.md .gitignore
git commit -m "Initial commit"
git remote add origin <URL>
git push -f --set-upstream origin main

Error: You are not allowed to force push code to a protected branch on this project.

GitLab.com: Settings -> Repository -> Protected Branches -> main: unprotect