4029
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 ...
189
votes
How to use the Homebrew installed git on Mac?
Status 2024
All the tricks mentioned here in several answers are not necessary anymore on Macs running macOS Sierra or higher with the latest Homebrew. Forget export PATH="..." and ...
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/...
77
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 ...
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 ...
42
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 ...
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 ...
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".
...
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 ...
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 ...
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/...
28
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 ...
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.
27
votes
How to use the Homebrew installed git on Mac?
I tried this and it works for me.
brew link --overwrite git
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 ...
21
votes
Accepted
Homebrew - How to upgrade a HEAD forumla?
It's --fetch-HEAD for upgrade command.
Try:
brew upgrade libimobiledevice --fetch-HEAD
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 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 ...
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 ...
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
/...
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.
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'
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♦
- 204k
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 ...
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 ...
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 ...
8
votes
Git auto-completion not working on Mac OSX 10.11.5 El Capitan
Enable Git Tab Autocomplete for Zsh
New Macs use the Zsh shell by default. If you’re using Zsh, add the following line to the ~/.zshrc file and restart your Terminal application:
autoload -Uz compinit ...
8
votes
Tell git not to use my GitHub account (Keychain) for public repositories - it's a privacy issue
Add the variable HOMEBREW_NO_GITHUB_API to your environment.
For example add this to your .bash_profile to turn off "once for all":
export HOMEBREW_NO_GITHUB_API=1
or put it in front of the brew ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
git × 204macos × 95
terminal × 51
homebrew × 36
xcode × 27
command-line × 24
ssh × 20
bash × 13
mac × 11
install × 9
keychain × 8
applescript × 5
permission × 5
filesystem × 5
path × 5
finder × 4
error × 4
auto-complete × 4
sublimetext × 4
macbook-pro × 3
automator × 3
password × 3
data-synchronization × 3
unix × 3
script × 3