Skip to main content
4018 votes
Accepted

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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 ...
The Onin's user avatar
  • 67.3k
186 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 ...
Jpsy's user avatar
  • 2,487
103 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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/...
michalczukm's user avatar
  • 3,537
76 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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 ...
diegoiglesias's user avatar
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 ...
wisbucky's user avatar
  • 5,225
44 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 [ ...
Caique Pereira's user avatar
40 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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 ...
Erik Madsen's user avatar
39 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 ...
techraf's user avatar
  • 3,998
39 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". ...
Arthur's user avatar
  • 1,611
36 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 ...
Mateusz Szlosek's user avatar
28 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/...
Harsh Vakharia's user avatar
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 ...
Tony Williams's user avatar
28 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

I tried the xcode-select --install but I was forced to install it from the App Store. Then all git stuff ran smoothly.
NoelAbey's user avatar
  • 399
27 votes

How to use the Homebrew installed git on Mac?

I tried this and it works for me. brew link --overwrite git
Song Wang's user avatar
  • 839
27 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 ...
Jpsy's user avatar
  • 2,487
22 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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 ...
Steffi's user avatar
  • 441
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
Kasper's user avatar
  • 319
19 votes

Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?

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 ...
mirth23's user avatar
  • 291
19 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 ...
Nimesh Neema's user avatar
  • 52.3k
19 votes
Accepted

Homebrew - How to upgrade a HEAD forumla?

It's --fetch-HEAD for upgrade command. Try: brew upgrade libimobiledevice --fetch-HEAD
Yurii Rochniak's user avatar
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 /...
Nimesh Neema's user avatar
  • 52.3k
12 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.
maxchiu's user avatar
  • 131
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 ...
NonCreature0714's user avatar
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'
Elliot Yap's user avatar
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
Błażej's user avatar
  • 349
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 ...
John N's user avatar
  • 1,497
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's user avatar
  • 203k
10 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 ...
benwiggy's user avatar
  • 36.6k
10 votes

Is it dangerous to leave “.DS_Store” files left in Git commit history?

I would remove them git rm .DS_Store and update your ignore file. They don’t add to your project and could leak data from other file names you didn’t stage for checkin. You should know best on what ...
bmike's user avatar
  • 237k
10 votes
Accepted

Is it dangerous to leave “.DS_Store” files left in Git commit history?

Have a look at what is stored in the .DS_Store file. Whether it is going to be dangerous or not depends on whether there is anything that could be stored in that file in your particular directory that ...
Jack Aidley's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible