Back to Readme
- If the problem is "main and master are entirely different commit histories.", the following will work
git checkout master
git branch main master -f
git checkout main
git push origin main -f
source
- Make an existing non-empty directory into a Git working directory and push files to a remote repository
cd <localdir>
git init
git add .
git commit -m 'message'
git remote add origin <url>
git push -u origin master
source
- Example problem in Windows: WSL creates .Zone.Identifier files. While cloning a repositry with such files, you may get the error "git clone error: invalid path 'path/filename.extension:Zone.Identifier'.
Solution: open cmd prompt as admin and run this command
git config --system core.protectNTFS false
Back to Readme