Git clone into a non-empty directory?

https://stackoverflow.com/questions/2411031/how-do-i-clone-into-a-non-empty-directory

git init
git remote add origin URL_to_Repo
git fetch
git pull origin master

Advertisements

xcrun: error: invalid active developer path macOS Sierra

giving me the following error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

How do I fix it?

Answer is simple – Open Terminal, and run the following:

xcode-select –install

It will tell you to install the necessary software to fix this issue.

Moyens-MBP:dwn moyen$ xcode-select –install
xcode-select: note: install requested for command line developer tools

Source: http://apple.stackexchange.com/questions/254380/macos-sierra-invalid-active-developer-path

Your branch is ahead of ‘origin/master’ by 3 commits

I’am really new by to doing work in a team of git environment and facing different issues time to time..
This is an issue that I faced today while did some changes in my local files and try to commit and pull/push…

after commit and also did some random changes. At last I got the message “Your branch is ahead of ‘origin/master’ by 3 commits” while try to pull.

So Finally I decided to reset all my changes with remote origin master and it’s so simple with the following (git reset – – hard origin/master) …

Moyens-MBP:corp moyen$ git reset – – hard origin/master

Where it means….

“throw away all my staged and un-staged changes, forget everything on my current local branch and make it exactly the same as origin/master”

 

link:http://stackoverflow.com/questions/15432052/what-is-the-meaning-of-git-reset-hard-origin-master