3981
votes
Accepted
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
Solution
Open Terminal, and run the following:
xcode-select --install
This will pop a dialogue box, Select "Install", and it will download and install the Command Line Tools package and fix ...
182
votes
How to use the Homebrew installed git on Mac?
Status 2022
All the tricks mentioned here in several answers are not necessary anymore on Intel Macs running macOS Sierra or higher with the latest Homebrew. Forget export PATH="..." and ...
102
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
If you don't want to install nor use Xcode (I don't) you can install only
command tools for Xcode (please see Edit)
Preconditions:
you have AppleID
Solution
Go to https://developer.apple.com/...
75
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
For macOS High Sierra, just run the same command:
xcode-select --install
and everything will get back to work.
2019 UPDATE: This is needed for every new macOS version, so it'll work for Catalina as ...
56
votes
Accepted
.git-completion.bash producing error on macOS Sierra 10.12.6
I ran into the exact same problem. After some digging, I finally figured out what the root problem is.
They made some major changes to the git-completion.bash script which requires a new feature in ...
43
votes
git auto-complete for *branches* at the command line?
Run this on terminal:
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
Then, do this:
vi ~/.bash_profile
Add this lines:
if [ ...
40
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
Here are the steps I needed to go through for Mojave:
First xcode-select --reset.
Next I needed to upgrade xcode tools to the latest version: sudo softwareupdate -ia --verbose (NB: this runs all ...
38
votes
Accepted
How do I escape the git commit window from OS X terminal?
It looks like you're inside the vi editor. Typing :wq and pressing enter should do it, i.e. save the commit message and exit.
: enters the command mode, w is for "write" (save) and q is for "quit".
...
37
votes
Accepted
Git Config Error in Xcode
No, this isn't a virus1.
It seems that your name and email address are not set up properly in Git. Go to Xcode Preferences and then Accounts, select the repository, and check the username.
You can ...
36
votes
Accepted
How to uninstall Git from the command shell?
Do not uninstall Apple-distributed Git. You can leave it as it is and run another version by having it in a directory earlier in PATH environment variable.
The easiest way to install another version ...
29
votes
git auto-complete for *branches* at the command line?
git and git-completion.bash already come with macOS command line tools (xcode-select --install). To enable bash autocomplete, add this to your ~/.bash_profile.
[ -f /Library/Developer/CommandLineTools/...
28
votes
Git auto-completion not working on Mac OSX 10.11.5 El Capitan
You are confusing the basic bash completion with the add on required for completing git commands.
The git that is installed by Apple lacks the required git-completion.bash file so you need to install ...
27
votes
Accepted
git is broken: "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo"
OK, I found the problem: the message was coming from the remote git server, not the client side. I ran sudo xcodebuild -license on the server side (where the repo is located and the git server is ...
27
votes
How to use the Homebrew installed git on Mac?
I tried this and it works for me.
brew link --overwrite git
27
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
I tried the xcode-select --install but I was forced to install it from the App Store.
Then all git stuff ran smoothly.
26
votes
git auto-complete for *branches* at the command line?
Git autocompletion on Catalina and newer (using Homebrew)
macOs changed from bash to zsh as default shell starting with Catalina.
So you will need specific autocomplete scripts for zsh.
Here is how to ...
22
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
xcode-select --install and xcode-select --reset didn't work for me.
I had to download it manually from Apple Developers website: https://developer.apple.com/download/
Choose the Command line of your ...
20
votes
How to uninstall Git from the command shell?
For people who installed git by following instructions on the official Git homepage, and therefore have git installed at /usr/local/bin/git, run the uninstall script:
/usr/local/git/uninstall.sh
19
votes
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sonoma?
The accepted answer is correct, but also note that git does not make it obvious if the error is coming from remote or from local. If you are running OS X on your remote, your install problem may be on ...
18
votes
Accepted
Ownership of the .config folder in home directory
The .config folder is supposed to be owned by the user. It appears that the ownership got changed to system by mistake on your machine.
To restore the default permission, execute the following ...
15
votes
Accepted
Broken Git installation on my Mac. How do I fix it?
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
/...
15
votes
Accepted
Homebrew - How to upgrade a HEAD forumla?
It's --fetch-HEAD for upgrade command.
Try:
brew upgrade libimobiledevice --fetch-HEAD
14
votes
Installing git on OSX 10.8 without Xcode
Note that this is a plain copy of a previous answer of mine on superuser.com.
Here's a way to install git on Mac OS X without XCode.
Git's official web site provides an installer : http://git-scm....
11
votes
Git auto-completion not working on Mac OSX 10.11.5 El Capitan
As a note for users, like me, who already updated to macOS Catalina, which deprecated bash, yet ended up at this answer as a top result...
For macOS Catalina+, which uses zsh, there are a few other ...
11
votes
How to remove default Git or update it?
sudo rm -rf /usr/bin/git wont work for El Capitan due to SIP restriction
simple solution is create alias
alias git='/usr/local/bin/git'
11
votes
How do I escape the git commit window from OS X terminal?
Press Escape
Press shift+Z shift+Z (capital Z twice).
It works a bit faster.
10
votes
Accepted
ZSH - missing git icons
Turns out I didn't have powerline font.
You can get it from here
After download, double click to install and set as defalut font & non-ascii font
10
votes
Accepted
Homebrew installation requests to use my confidential keychain information. Should I allow it to do so?
My answer to question 2 ("Do I have to click 'Allow' for the installation to complete successfully? What will happen if I don't?") is - click "deny" and see what happens. The worst that could happen ...
10
votes
Accepted
Is git pre-installed on macOS Sierra?
macOS does come with a binary at /usr/bin/git, however by default it's a wrapper around the command line tools installer. Running the command will print the following and return immediately.
note: ...
grg♦
- 199k
9
votes
Accepted
How much disk space do the "command line developer tools" take up?
The installer says it requires 2.72 Gb of space. It installs a variety of Unix tools for compiling software, and other advanced usage (such as git) on the command line, including 'many other useful ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
git × 201macos × 84
terminal × 52
homebrew × 37
xcode × 25
command-line × 21
ssh × 19
mac × 12
bash × 12
keychain × 9
install × 8
applescript × 5
permission × 5
filesystem × 5
path × 5
macbook-pro × 4
finder × 4
password × 4
error × 4
auto-complete × 4
sublimetext × 4
catalina × 3
mojave × 3
automator × 3
data-synchronization × 3