popular version control and how it gets used on OS X and iOS
Questions tagged [git]
193 questions
2752
votes
7 answers
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Ventura?
After upgrading to macOS Ventura, I tried to run git from Terminal but it kept giving me the following error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:…
The Onin
- 61,125
- 4
- 13
- 17
470
votes
15 answers
git auto-complete for *branches* at the command line?
On my Linux machine I have autocomplete for branches with Git.
[Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT Lane's answer at all]
For example I can type git checkout+TAB and get a list…
Michael Durrant
- 16,996
- 20
- 48
- 71
220
votes
14 answers
How to use the Homebrew installed git on Mac?
I have installed the newest version of git (1.8.3) using homebrew but when I type
git --version
in my terminal, it prints:
git version 1.7.10.2 (Apple Git-33)
What should I do to replace the old version of git with the new one?
Levani
- 4,255
- 5
- 18
- 18
40
votes
5 answers
.git-completion.bash producing error on macOS Sierra 10.12.6
I've followed the process for git-completion as per the description provided at https://medium.com/@farooqyousuf/autocomplete-git-commands-and-branch-names-in-terminal-on-mac-os-x-4e0beac0388a:
The first step is to execute this command in your…
Rishi Kulshreshtha
- 511
- 4
- 8
32
votes
5 answers
My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help
I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell /bin/bash if that matters:
SOURCEDIR="${3/\/Volumes/}"
cd…
racl101
- 443
- 1
- 5
- 6
30
votes
4 answers
How to uninstall Git from the command shell?
I currently have installed
git --version
git version 2.7.4 (Apple Git-66)
At this path
which git
/usr/bin/git
In a previous answer
How to uninstall Git?
it was suggested to run the uninstall.sh, but if I run cd /usr/bin/git I get -bash: cd:…
Dambo
- 403
- 1
- 4
- 5
26
votes
4 answers
Git Config Error in Xcode
When I opened xcode and tried to make a macosx app, this weird message came up.
Is this a glitch or a virus, as Apple wouldn't say something like this. It does not look like a system message.
Charlie McMahon
- 371
- 3
- 6
25
votes
7 answers
Where did /usr/bin/git come from?
I have a small problem. At some point I used git but I don't remember if it was installed by default on Lion.
Here is the version and path of git:
$ git --version
git version 1.7.5.4
$ which git
/usr/bin/git
I also have a newer git in…
cromestant
- 353
- 1
- 3
- 5
25
votes
2 answers
How do I escape the git commit window from OS X terminal?
I am just learning git and the terminal and I wanted to make a test commit but I cannot seem to be able to escape the text editor window to save the commit
Lukas_T
- 541
- 2
- 6
- 11
23
votes
6 answers
Git auto-completion not working on Mac OSX 10.11.5 El Capitan
I have tried the examples found here to get Git auto-completion working on El Capitan, however none of the examples work for me.
I installed bash-completion with Homebrew (brew install bash-completion).
This is my ~/.bash_profile currently (as you…
crmpicco
- 1,051
- 6
- 16
- 26
21
votes
4 answers
error: There was a problem with the editor 'vi' when using it with git
I have this strange problem with using vi as the editor for git commit -a.
Normal flow is: I type git commit -a, vi appears, I enter my commit message, and then :wq to save & exit from vi.
This works fine. However, sometimes I make a typo and…
houbysoft
- 8,972
- 15
- 60
- 93
19
votes
5 answers
git is broken: "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo"
My install of git seems to be broken, and it looks like somehow my Developer Tools are broken.
When I try to run git, I get this error. This happens both with /usr/bin/git and /opt/local/bin/git (from MacPorts):
cook47@rcmac (RC_bash_lib…
Rich
- 1,139
- 2
- 15
- 21
17
votes
6 answers
Completion for git commands
I recently switched from using an Ubuntu box for the last 7 years to a Mac. I have read other posts like Switching from Ubuntu to OS X and I'm lost and What is the difference between iTerm2 and Terminal?
Why don't iTerm2 and Terminal complete the…
rgamber
- 465
- 1
- 5
- 10
16
votes
3 answers
AMSupportURL* "is implemented in both"?
I get the below error message when I run git for the first time after a reboot:
objc[728]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1eff3a7a0) and ?? (0x1188402b8). One of the two will be used. Which one is…
frank cedar
- 161
- 1
- 1
- 4
16
votes
4 answers
Installing git on OSX 10.8 without Xcode
I'd like to setup my dev environment on my girlfriend's iMac, but she's not cool with me wasting 3GB of space, which is what Xcode takes up. She also doesn't want to/can't upgrade past 10.8 because then Photoshop won't work, or some nonsense.
How…
MattDiamant
- 261
- 1
- 2
- 4