19

I've come across several topics about 'updating' or 'installing' an 'official' version of git to replace the git pre-installed by Apple.

I haven't been able to find the reasons/benefits for/of doing so... Can someone explain why doing this is important or unimportant?

Thanks in advance !

2 Answers 2

16

It is basically the same as the upstream version at this point. You can see the differences in my github repo:

https://github.com/jeremyhu/git/commits/master

The major differences between Apple's git and mainline over time have been:

  • the use of SecureTransport and CommonCrypto instead of OpenSSL (merged into mainline)
  • git-svn improvements (merged into mainline)
  • fix for a regression that mainline didn't want to take at the time (merged into mainline)
  • test for that regression
  • Support for relocation on the filesystem (since Xcode.app can move around)
  • Support for Xcode.app-bundled gitconfig (for osxkeychain, etc)
  • Support for Xcode.app-bundled gitattributes (for diff options, etc)
  • Setting osxkeychain as credential.helper (since moved to a default in gitconfig)
  • trust_ctime off by default (should move to a setting in gitconfig)
  • Mark tests that fail on OSX as expected to fail
  • Update expected values for tests that are affected by Xcode.app's gitconfig
Sign up to request clarification or add additional context in comments.

4 Comments

Is there a table that shows which Apple Git version a given Xcode version ships with?
Not that I'm aware of, but you can just run git --version and it will tell you the version.
One more thing... Now the default branch name is main on Apple Git.
That's not a divergence between upstream git and Apple git. It's a configuration option set in Xcode's gitconfig.
8

It's almost the same as the official versions but in a different versioning.

Read below on how to update and upgrade your git version: https://modulesunraveled.com/installing-git/updating-git-if-you-have-version-apple-well-official-install

5 Comments

Okay thanks. So you'd agree to say that if one has git Apple version, one doesn't need to get the official version instead?
You should since apple are not auto updating git version when there are new upgrades. you should update in order to be updated since its not part of App store updates
Ooooh okay! Thanks again. Good day to you!
any idea WHY apple had to create apple git?
@mireilleraad Like many distributions, distributors often have some additional changes / configurations that they make to the software in order to ship it... patches cherry-picked back, changes still being pushed upstream, etc. It's pretty much standard for any distributor and not unique to Apple. Look at my answer for more details...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.