Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 963 Bytes

File metadata and controls

38 lines (27 loc) · 963 Bytes

Back to Readme

Merge issues

  • 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

Invalid path error

  • 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