Questions tagged [git]

popular version control and how it gets used on OS X and iOS

Filter by
Sorted by
Tagged with
1485
votes
7answers
918k views

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

After upgrading to macOS Sierra (and later Mojave), I tried to run git from Terminal but it kept giving me the following error: xcrun: error: invalid active developer path (/Library/Developer/...
346
votes
11answers
179k views

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 ...
115
votes
11answers
125k views

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 ...
40
votes
5answers
7k views

.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 ...
26
votes
4answers
6k views

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.
24
votes
6answers
22k views

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 /...
18
votes
4answers
17k views

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: ...
17
votes
5answers
15k views

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 (...
16
votes
6answers
16k views

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 ...
15
votes
2answers
59k views

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
14
votes
4answers
22k views

How do I rename a file in git that differs by case only?

In my git (Xcode) project, I committed a filename with improper case. Now I went to try to rename it, but when I commit, I get: fatal: Will not add file alias 'MyProject/MyFile.h' ('MyProject/...
14
votes
4answers
31k views

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,...
12
votes
4answers
6k views

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 ...
11
votes
4answers
18k views

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 ...
9
votes
2answers
12k views

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-...
9
votes
1answer
2k views

How to show git files in Finder?

This may be too close to a duplicate for Git plug-in for Finder?, but I'm after a tool that will merely show me whether there is a repo in the current directory, and the state of the files within. I ...
8
votes
2answers
3k views

Show github notifications in Mountain Lion Notification Center

Simply put: Is there a way to show the notifications on github in the notification center of the new Mountain Lion?
8
votes
3answers
9k views

How to use Xcode 4 mergetool in a standalone fashion?

I sometimes have to make git merges on the console. Up to now, for resolving conflicts, I was using Xcode 3's FileMerge (you can open it on the console using the 'opendiff' command). If conflicts show,...
7
votes
1answer
300 views

Does Mac OSX Mountain Lion autosave/versions interact badly with git?

I use git with some of my documents and wonder if the autosaved versions created by Mountain Lion could interfere (or even break) git versioning? This is important for me as I do not work on Macs ...
6
votes
3answers
208 views

Which macOS Git GUI app offers a “Split View Staging” view?

I use SourceTree as a Git GUI tool. I'm very productive with the app and find it far preferable to the command line Git interface for common tasks. Unfortunately, SourceTree is incredibly slow, buggy,...
6
votes
3answers
3k views

Git plug-in for Finder?

Is there a plug-in for the Finder which lets me see and do all my git-related stuff? There are many different apps or the terminal which change the prompt to show that files are “dirty” in terms of ...
6
votes
2answers
3k views

Using an external merge tool does not work on SourceTree

I am running OS X.10, Xcode 7 and SourceTree 2. When I select a conflicted file and Launch an external merge tool, there is a window that appears very briefly... and then nothing happens. I tried (...
6
votes
1answer
7k views

Setting up a git (ssh) server using OS X Server

I would like to use OS X Server to set up a git server that I can ssh into from other machines on my network. I realize that Xcode Service has repository functionality built in, but I am looking for ...
5
votes
2answers
3k views

Use downloaded Git instead of preinstalled Git

I am following the Lynda.com Git Essential Training. After he downloads and installs Git he enters which git and gets /usr/local/git/bin/git However when I do it I still get the preinstalled path /usr/...
5
votes
2answers
3k views

Homebrew - Upgrading software in /usr/bin

My OS X comes with a version of Git installed in /usr/bin. However, this version is older than the official stable one. I would like to upgrade it. Can I use Homebrew to upgrade this version? Or ...
5
votes
2answers
2k views

Homebrew installation requests to use my confidential keychain information. Should I allow it to do so?

I was installing Homebrew on my MacBook Pro (as per the instructions on this page), when the following message popped up: git-credential-osxkeychain wants to use your confidential information ...
5
votes
1answer
2k views

Tell git not to use my GitHub account (Keychain) for public repositories - it's a privacy issue

Whenever some script or Git clones/pulls something from GitHub I don't wish to send my GitHub Account, if the repo is public. How to make sure I won't be authenticated with my GitHub user with ...
5
votes
1answer
6k views

How to Sync MacOS Applications + Preferences across multiple Macs without OS X Server?

Will the following work? If not, can someone propose better alternaives to solve this problem? Summary problem: I want to sync multiple MacBook Air's, Pro's and possibly Mini's with the same user-...
5
votes
3answers
5k views

How can I determine what is hanging git on my OS X machine?

I'm trying to do a git pull on my Mac from a local repo. It is hanging. My question is, why is it hanging and how can I stop it? That is, I'm in a repo where the "remotes" are on the local ...
4
votes
2answers
1k views

How do I stop GitHub Conduit?

How do I stop GitHub Conduit and keep GitHub.app from reinstalling the job in launchd?
4
votes
1answer
3k views

What are the downsides to using Apple Git?

In other questions, such as "How to properly update git on mac?" it is implied that Apple Git isn't as good as using separately installed versions of Git. What are the downsides to using Apple Git?
4
votes
2answers
745 views

Git clone fails with “fatal: multiple updates for ref 'refs/tags/v1.0.0' not allowed” on MacOS Mojave

I did a lot of operations on my computer last night, basically updating/upgrading(?) brew, which installed a new git version, updated python, lots of stuff and today I figured I couldn't clone a ...
4
votes
2answers
5k views

ZSH - missing git icons

Hi I've just installed ZSH and it looks awesome but git icons are still missing and I don't know what I miss. What I should do?
4
votes
1answer
886 views

Broken Git installation on my Mac. How do I fix it?

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....
4
votes
1answer
2k views

Need help with update to latest Git using Terminal

I was trying to update to the latest Git version in my Terminal. I've no clue what I did and all I remember was that I removed the previous installed Git I think because when i run the following ...
4
votes
1answer
1k views

Can no longer ssh in to machine as git user after upgrading to Mavericks

I've got a server (just a mac mini) with two accounts: myRegularUser git (and some others) The git's home directory is in /Users/Shared/git. Since upgrading to Mavericks, I can't ssh into git@...
4
votes
1answer
3k views

Is git pre-installed on macOS Sierra?

I am very new to macOS, knowing Ubuntu a little bit, and am wondering whether git is pre-installed on macOS or not. Typing which -a git results in git is /usr/bin/git But when I init a test-repo ...
4
votes
3answers
3k views

Homebrew warning: “No developer tools installed” even though Xcode is installed

After installing Homebrew the "brew doctor" command returns: Warning: No developer tools installed. You should install the Command Line Tools. Run `xcode-select --install` to install them. …and I do ...
4
votes
2answers
606 views

Sync files between two different folders on a single Mac

I am looking for a solution to sync files within different folders on a single Mac. The files are tracked under Git version control system, so I can't use aliases.
4
votes
1answer
48 views

How to have 2 Github SSH accesses?

I have a personal account ericpersonal and a company account ericcompanyabc (they forced me to even though they could have add my personal GitHub account to their repos) on github.com. I'm using a ...
4
votes
4answers
1k views

Git not working over AFP

I've got a git repository on my file server which I'm connecting to via AFP. Whenever I try to do a git operation on the shared repository, such as staging a file, I get the following error message: ...
4
votes
1answer
638 views

How I can install a Homebrew recipe maintained in a separate git repository outside of /usr/local/Library/Formula?

I'm writing a quick Homebrew formula for my own private purposes (it's unlikely to be shared). I'd like to install it , but would prefer not to maintain my own local fork of Homebrew, but instead ...
4
votes
0answers
56 views

How to sync keyboard shortcuts setting of Mac OS X from one computer to another? [duplicate]

I have two Macbooks, and I set up many keyboard shortcuts for different applications. Now I am trying to sync these settings from one Macbook to another through git, which introduced by Atlassian. ...
4
votes
0answers
72 views

pinentry implementation with fingerprint sensor support

Currently, I am using Pinentry Mac from Xcode on my system to sign git commits. For this, I am having to input my passphrase each time I am waiting to sign a commit. Seeing that my MacBook Pro has a ...
3
votes
1answer
3k views

Ownership of the .config folder in home directory

Who is supposed to be the owner of the .config directory under user's home folder? On my machine it appears to be owned by the system user and it is only readable by that user. Several programs, ...
3
votes
1answer
2k views

Git clone error after OS X Mountain Lion update

I just updated my MBP to OSX 10.8 and am trying to start a new project with brunch.io which by default uses coffeescript and I prefer javascript so I need to clone the simple js skeleton. So something ...
3
votes
2answers
1k views

iCloud drive and git repository

I have upgraded some of my Macs to Sierra. Now, I'm wondering whether I want to enable iCloud on the Document folder or not. It seems useful if it works well. I'm syncing some of the PDF files between ...
3
votes
1answer
420 views

Security update for git on mac

The latest git installers linked to from http://git-scm.com/download/mac all seem to be for snow-leopard http://sourceforge.net/projects/git-osx-installer/files/git-2.2.1-intel-x86_64-snow-leopard.dmg/...
3
votes
1answer
6k views

How to recover files from command “git clean -df”

I accidentally run the command "git clean -df", so I lost many directories and files, I want to recover them, I don't have backup in time machine. I tried some software to recover, but they don't work....
3
votes
3answers
2k views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash shell, ...