Git on macOS, xcrun: error: invalid active developer path

After upgrading to macOS Big Sur 11, macOS Monterey 12, macOS Ventura 13, etc. Does it seem every upgrading macOS will cause the following error message for the git command? How to fix it? Terminal % git xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Solution Open the Terminal, and run this …

Read more

Git – Unable to resolve reference ‘refs/remotes/origin/master’: reference broken

A git pull and hits the below "reference broken" error message? Terminal $ git pull error: cannot lock ref ‘refs/remotes/origin/master’: unable to resolve reference ‘refs/remotes/origin/master’: reference broken From bitbucket.org:xx/mkyong-tutorials ! [new branch] master -> origin/master (unable to update local ref) Solution Unsure the root cause of the "reference broken". To fix it, delete this file …

Read more

Git pull – refusing to merge unrelated histories

Add –allow-unrelated-histories to solve the Git fatal error – “refusing to merge unrelated histories” Terminal $ git pull origin master From https://github.com/mkyong/java-concurrency * branch master -> FETCH_HEAD fatal: refusing to merge unrelated histories To fix it : Terminal $ git pull origin master –allow-unrelated-histories From https://github.com/mkyong/java-concurrency * branch master -> FETCH_HEAD Merge made by the …

Read more