Broken Git installation on my Mac. How do I fix it?Is the installation of Xcode from App Store enough for having the developer tools?Does installing Command Line Tools for Xcode also install Git?Can I install Compass in Yosemite WITHOUT installing Xcode or Command Line Developer Tools?Trying to install Xcode on Yosemite 10.10.5How do I fix a broken OS X update that shows as both Available and Installed?git is broken: “Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo”XCode 7.1.1 update, missing otool and gitGet Git working on Mac LionHow to compile with Command Line Tools for Xcode after deleting the Xcode.app application bundle?brew install package asks to install command line tools from a path that doesn't exist
Airbnb - host wants to reduce rooms, can we get refund?
In a vacuum triode, what prevents the grid from acting as another anode?
Reconstruct a matrix from its traces
Theorem won't go to multiple lines and is causing text to run off the page
Identifying my late father's D&D stuff found in the attic
Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?
How can I support myself financially as a 17 year old with a loan?
What does a yield inside a yield do?
If Earth is tilted, why is Polaris always above the same spot?
What happens if I start too many background jobs?
Upside-Down Pyramid Addition...REVERSED!
Why is C# in the D Major Scale?
Manager is threatning to grade me poorly if I don't complete the project
Selecting a secure PIN for building access
How to reply this mail from potential PhD professor?
Why is B♯ higher than C♭ in 31-ET?
Can Ghost kill White Walkers or Wights?
Accidentally deleted the "/usr/share" folder
What happens to matryoshka Mordenkainen's Magnificent Mansions?
Point of the the Dothraki's attack in GoT S8E3?
In Avengers 1, why does Thanos need Loki?
Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?
Was there ever a Kickstart that took advantage of 68020+ instructions that would work on an A2000?
Is Cola "probably the best-known" Latin word in the world? If not, which might it be?
Broken Git installation on my Mac. How do I fix it?
Is the installation of Xcode from App Store enough for having the developer tools?Does installing Command Line Tools for Xcode also install Git?Can I install Compass in Yosemite WITHOUT installing Xcode or Command Line Developer Tools?Trying to install Xcode on Yosemite 10.10.5How do I fix a broken OS X update that shows as both Available and Installed?git is broken: “Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo”XCode 7.1.1 update, missing otool and gitGet Git working on Mac LionHow to compile with Command Line Tools for Xcode after deleting the Xcode.app application bundle?brew install package asks to install command line tools from a path that doesn't exist
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've had git
running on my MacBook Pro (macOS High Sierra 10.13.6) for ages. I recently uninstalled Xcode because I never use it, but that seems to have broken Git and I can't figure out how to fix it.
If I open a terminal window and type git --version
, I get the following error:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
If I then try Xcode-select --install, I get:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Software Update shows no updates are available. I tried to reinstall Xcode from the App Store, but I'm getting:
Xcode can’t be installed on “Macintosh HD” because macOS version 10.14.3 or later is required.
I can't upgrade my macOS version because it says no updates are available!
I tried installing git from the downloadable package, but that made no difference (it seemed to install ok, but I don't know where it installed and it's still looking for the old version). Then tried Homebrew, which again seemed to work but made no difference, so I uninstalled it.
I don't know what to try next! I don't really know what I'm doing with macOS and I'm a bit concerned I'll break stuff if I fiddle too much. Can anyone help?
terminal install xcode git
|
show 4 more comments
I've had git
running on my MacBook Pro (macOS High Sierra 10.13.6) for ages. I recently uninstalled Xcode because I never use it, but that seems to have broken Git and I can't figure out how to fix it.
If I open a terminal window and type git --version
, I get the following error:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
If I then try Xcode-select --install, I get:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Software Update shows no updates are available. I tried to reinstall Xcode from the App Store, but I'm getting:
Xcode can’t be installed on “Macintosh HD” because macOS version 10.14.3 or later is required.
I can't upgrade my macOS version because it says no updates are available!
I tried installing git from the downloadable package, but that made no difference (it seemed to install ok, but I don't know where it installed and it's still looking for the old version). Then tried Homebrew, which again seemed to work but made no difference, so I uninstalled it.
I don't know what to try next! I don't really know what I'm doing with macOS and I'm a bit concerned I'll break stuff if I fiddle too much. Can anyone help?
terminal install xcode git
What does typingtype -a git
andecho $PATH
shows you?
– Nimesh Neema
Apr 23 at 10:36
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
1
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try runningxcode-select --reset
.
– Nimesh Neema
Apr 23 at 10:44
1
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46
|
show 4 more comments
I've had git
running on my MacBook Pro (macOS High Sierra 10.13.6) for ages. I recently uninstalled Xcode because I never use it, but that seems to have broken Git and I can't figure out how to fix it.
If I open a terminal window and type git --version
, I get the following error:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
If I then try Xcode-select --install, I get:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Software Update shows no updates are available. I tried to reinstall Xcode from the App Store, but I'm getting:
Xcode can’t be installed on “Macintosh HD” because macOS version 10.14.3 or later is required.
I can't upgrade my macOS version because it says no updates are available!
I tried installing git from the downloadable package, but that made no difference (it seemed to install ok, but I don't know where it installed and it's still looking for the old version). Then tried Homebrew, which again seemed to work but made no difference, so I uninstalled it.
I don't know what to try next! I don't really know what I'm doing with macOS and I'm a bit concerned I'll break stuff if I fiddle too much. Can anyone help?
terminal install xcode git
I've had git
running on my MacBook Pro (macOS High Sierra 10.13.6) for ages. I recently uninstalled Xcode because I never use it, but that seems to have broken Git and I can't figure out how to fix it.
If I open a terminal window and type git --version
, I get the following error:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
If I then try Xcode-select --install, I get:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Software Update shows no updates are available. I tried to reinstall Xcode from the App Store, but I'm getting:
Xcode can’t be installed on “Macintosh HD” because macOS version 10.14.3 or later is required.
I can't upgrade my macOS version because it says no updates are available!
I tried installing git from the downloadable package, but that made no difference (it seemed to install ok, but I don't know where it installed and it's still looking for the old version). Then tried Homebrew, which again seemed to work but made no difference, so I uninstalled it.
I don't know what to try next! I don't really know what I'm doing with macOS and I'm a bit concerned I'll break stuff if I fiddle too much. Can anyone help?
terminal install xcode git
terminal install xcode git
edited Apr 23 at 11:36
Nimesh Neema
18.2k74981
18.2k74981
asked Apr 23 at 10:35
SharonSharon
1234
1234
What does typingtype -a git
andecho $PATH
shows you?
– Nimesh Neema
Apr 23 at 10:36
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
1
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try runningxcode-select --reset
.
– Nimesh Neema
Apr 23 at 10:44
1
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46
|
show 4 more comments
What does typingtype -a git
andecho $PATH
shows you?
– Nimesh Neema
Apr 23 at 10:36
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
1
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try runningxcode-select --reset
.
– Nimesh Neema
Apr 23 at 10:44
1
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46
What does typing
type -a git
and echo $PATH
shows you?– Nimesh Neema
Apr 23 at 10:36
What does typing
type -a git
and echo $PATH
shows you?– Nimesh Neema
Apr 23 at 10:36
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
1
1
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try running
xcode-select --reset
.– Nimesh Neema
Apr 23 at 10:44
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try running
xcode-select --reset
.– Nimesh Neema
Apr 23 at 10:44
1
1
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46
|
show 4 more comments
1 Answer
1
active
oldest
votes
To debug this, start by executing:
type -a git
and
echo $PATH
In OP's case, running the above commands gave the following output respectively:
git is /usr/bin/git
git is /usr/local/bin/git
and
/usr/local/opt/php@7.0/sbin
/usr/local/opt/php@7.0/bin
/Applications/MAMP/bin/php/php7.1.8/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/autoconf
/opt/X11/bin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
/Applications/Android Studio.app/Contents/plugins/flutter/bin
(the output from the command lines are formatted for clarity)
Now, run the following commands (using absolute path) to check if git
package is actually installed:
/usr/bin/git --version
and
/usr/local/bin/git --version
The above gave the following output, respectively:
active developer path does not exist
and
git version 2.21.0
This indicates that Homebrew installed copy is still present in the system. However, Xcode/system installed copy (which should take precedence due to $PATH
variable configuration) wasn't accessible because developer path couldn't be found.
To resolve the issue and to use the Xcode/system installed copy of git, run:
xcode-select --reset
This will resolve the error.
To use the latest version of Git, install the same via Homebrew by running:
brew install git
and set the PATH
variable so that /usr/local/bin
takes precedence over /usr/bin
.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To debug this, start by executing:
type -a git
and
echo $PATH
In OP's case, running the above commands gave the following output respectively:
git is /usr/bin/git
git is /usr/local/bin/git
and
/usr/local/opt/php@7.0/sbin
/usr/local/opt/php@7.0/bin
/Applications/MAMP/bin/php/php7.1.8/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/autoconf
/opt/X11/bin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
/Applications/Android Studio.app/Contents/plugins/flutter/bin
(the output from the command lines are formatted for clarity)
Now, run the following commands (using absolute path) to check if git
package is actually installed:
/usr/bin/git --version
and
/usr/local/bin/git --version
The above gave the following output, respectively:
active developer path does not exist
and
git version 2.21.0
This indicates that Homebrew installed copy is still present in the system. However, Xcode/system installed copy (which should take precedence due to $PATH
variable configuration) wasn't accessible because developer path couldn't be found.
To resolve the issue and to use the Xcode/system installed copy of git, run:
xcode-select --reset
This will resolve the error.
To use the latest version of Git, install the same via Homebrew by running:
brew install git
and set the PATH
variable so that /usr/local/bin
takes precedence over /usr/bin
.
add a comment |
To debug this, start by executing:
type -a git
and
echo $PATH
In OP's case, running the above commands gave the following output respectively:
git is /usr/bin/git
git is /usr/local/bin/git
and
/usr/local/opt/php@7.0/sbin
/usr/local/opt/php@7.0/bin
/Applications/MAMP/bin/php/php7.1.8/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/autoconf
/opt/X11/bin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
/Applications/Android Studio.app/Contents/plugins/flutter/bin
(the output from the command lines are formatted for clarity)
Now, run the following commands (using absolute path) to check if git
package is actually installed:
/usr/bin/git --version
and
/usr/local/bin/git --version
The above gave the following output, respectively:
active developer path does not exist
and
git version 2.21.0
This indicates that Homebrew installed copy is still present in the system. However, Xcode/system installed copy (which should take precedence due to $PATH
variable configuration) wasn't accessible because developer path couldn't be found.
To resolve the issue and to use the Xcode/system installed copy of git, run:
xcode-select --reset
This will resolve the error.
To use the latest version of Git, install the same via Homebrew by running:
brew install git
and set the PATH
variable so that /usr/local/bin
takes precedence over /usr/bin
.
add a comment |
To debug this, start by executing:
type -a git
and
echo $PATH
In OP's case, running the above commands gave the following output respectively:
git is /usr/bin/git
git is /usr/local/bin/git
and
/usr/local/opt/php@7.0/sbin
/usr/local/opt/php@7.0/bin
/Applications/MAMP/bin/php/php7.1.8/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/autoconf
/opt/X11/bin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
/Applications/Android Studio.app/Contents/plugins/flutter/bin
(the output from the command lines are formatted for clarity)
Now, run the following commands (using absolute path) to check if git
package is actually installed:
/usr/bin/git --version
and
/usr/local/bin/git --version
The above gave the following output, respectively:
active developer path does not exist
and
git version 2.21.0
This indicates that Homebrew installed copy is still present in the system. However, Xcode/system installed copy (which should take precedence due to $PATH
variable configuration) wasn't accessible because developer path couldn't be found.
To resolve the issue and to use the Xcode/system installed copy of git, run:
xcode-select --reset
This will resolve the error.
To use the latest version of Git, install the same via Homebrew by running:
brew install git
and set the PATH
variable so that /usr/local/bin
takes precedence over /usr/bin
.
To debug this, start by executing:
type -a git
and
echo $PATH
In OP's case, running the above commands gave the following output respectively:
git is /usr/bin/git
git is /usr/local/bin/git
and
/usr/local/opt/php@7.0/sbin
/usr/local/opt/php@7.0/bin
/Applications/MAMP/bin/php/php7.1.8/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/autoconf
/opt/X11/bin
/usr/local/share/dotnet
~/.dotnet/tools
/Library/Frameworks/Mono.framework/Versions/Current/Commands
/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
/Applications/Android Studio.app/Contents/plugins/flutter/bin
(the output from the command lines are formatted for clarity)
Now, run the following commands (using absolute path) to check if git
package is actually installed:
/usr/bin/git --version
and
/usr/local/bin/git --version
The above gave the following output, respectively:
active developer path does not exist
and
git version 2.21.0
This indicates that Homebrew installed copy is still present in the system. However, Xcode/system installed copy (which should take precedence due to $PATH
variable configuration) wasn't accessible because developer path couldn't be found.
To resolve the issue and to use the Xcode/system installed copy of git, run:
xcode-select --reset
This will resolve the error.
To use the latest version of Git, install the same via Homebrew by running:
brew install git
and set the PATH
variable so that /usr/local/bin
takes precedence over /usr/bin
.
edited Apr 23 at 11:35
answered Apr 23 at 10:56
Nimesh NeemaNimesh Neema
18.2k74981
18.2k74981
add a comment |
add a comment |
What does typing
type -a git
andecho $PATH
shows you?– Nimesh Neema
Apr 23 at 10:36
Sorry, line breaks not working... first one gives: git is /usr/bin/git git is /usr/local/bin/git
– Sharon
Apr 23 at 10:37
Second gives: /usr/local/opt/php@7.0/sbin:/usr/local/opt/php@7.0/bin:/Applications/MAMP/bin/php/php7.1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/autoconf:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Applications/Android Studio.app/Contents/plugins/flutter/bin
– Sharon
Apr 23 at 10:38
1
The Homebrew installed copy appears to be present. The PATH variable gives precedence to Xcode installed copy. Looking at the error, "active developer path does not exist", you'll need to reset the developer path. Try running
xcode-select --reset
.– Nimesh Neema
Apr 23 at 10:44
1
That seems to have worked! 'git --version' now gives the version number. Thank you!
– Sharon
Apr 23 at 10:46