blogslmka.blogg.se

Instal the new version for apple Dig Out!
Instal the new version for apple Dig Out!








instal the new version for apple Dig Out!

If the above is true and $PATH is correct but git -version is still running the /usr/bin/git command then the quickest and simplest fixes are to either: Btw, macOS sets up the $PATH variable this way by default but if you've changed your $PATH just ensure that /usr/local/bin comes first. When you run a non-absolute command like git it will search directories in the $PATHenvironment variable and use the first command it finds so you should run echo $PATH and ensure that /usr/local/bin comes before /usr/bin, and if it does then running git should run the correct command for you. You can alternatively confirm by passing -version to each absolute command path to see which is which. The one in /usr/local/bin/git is the one from homebrew which you can confirm with ls -al /usr/local/bin/git and you'll see it's symlinked to the git binary installed in homebrew's Cellar directory. If you do which -a git you'll notice there are multiple versions of git installed assuming you have one installed from XCode (or straight from git) and another that you've just installed from homebrew. For newer versions of macOS, the problem that myself and possibly others experienced is due to simply not restarting the terminal after running brew install git. For details see comment and my comment below it that explains where confusion can happen after installing git with homebrew alongside Xcode's git. However it's unlikely any of this is necessary with newer versions of macOS if you've restarted the terminal after installing git with homebrew. IMPORTANT EDIT - Any solution I wrote in this comment should be ignored unless you've already done the following: restarted your terminal after running brew install git (important!), ensured which git is returning /usr/local/bin/git and that this is what brew installed, confirmed /usr/local/bin/git -version is displaying the new version installed via brew, and if git -version is still returning the old Xcode version even after restarting your terminal then you can either use simple workarounds to add the path to the proper git install as others and myself mentioned (shown below this edit) or you can use people's solutions above to remove Xcode' git.

instal the new version for apple Dig Out!

How do I know if I am using the right git on my system? I checked which git and it shows "/usr/local/bin/git".

instal the new version for apple Dig Out!

I checked my git version and it was 2.23.0, I did brew install git which should have updated to 2.28.0 I believe however when I restarted my mac and checked git version I still see 2.23.0.










Instal the new version for apple Dig Out!