Upgrade Git 1.9.3 on Mac OS X or not? - xcode

Xcode installed Git 1.9.3 on Mac OS X 10.10.1.
When I run Heroku, the following message shows up:
Your version of git is 1.9.3. Which has serious security
vulnerabilities. More information here:
https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
Should I download from Git from official website and upgrade to 2.x? Will it affect Xcode's operation?

I am running git 2.1.2 and everything seems fine, including Xcode – I use git extensively there. I installed using homebrew, and I highly recommend using that method if you plan to upgrade.

Related

How do I properly upgrade SVN on MAC?

I'm starting on a new team who are all on PCs using TortoiseSVN with SVN version 1.9.2. I'm on a Mac OSX (El Capitan) using the Versionsapp. When I check svn --version in terminal i get 1.7.10.
When I try any svn command such as svn update I get
svn: E155021: This client is too old to work with the working copy at
'/Users/dpowell/Desktop/sites/site.org.new' (format 31).
You need to get a newer Subversion client. For more details, see
http://subversion.apache.org/faq.html#working-copy-format-change
I've gone to the site and downloaded the python script but don't know it will do anything to help (i.e. I don't know how to use it). I've also downloaded the 1.9 package and tried installing svn that way.
I'm not sure what path to take to solve this issue
The Python script you downloaded from there was to downgrade your SVN version - you need to upgrade your SVN version. I recommend going the homebrew route - it will save you lots of pain in upgrading / installing OSX packages in the future.
Follow the instructions here: http://brew.sh/
(copy that line into a terminal an press ENTER, then follow the prompts)
Then, when homebrew is installed, so update SVN, just do brew install svn.
In Terminal, type "svn --version" to find out what version you currently have
Go to http://www.wandisco.com/subversion/download#osx and download the latest client for OS X and install it. This will install the new svn into /opt/subversion/bin
Got to your terminal and check your $PATH by typing "echo $PATH". If you don't see /opt/subversion/bin in there, make sure you add it by typing export PATH=/opt/subversion/bin:$PATH. If it DOES exist and appears AFTER /usr/bin, then you may need to remove an older copy of svn that came installed on OS X. To do so, go to /usr/bin and remove all files starting with svn. This isn't an exact science but it should do the trick.
For me export PATH=/opt/subversion/bin:$PATH worked as it was installed in /opt/subversion/bin
Make sure you reload your .profile first by typing
. ./.profile*
Type "svn --version". You should see that you have the newest version installed!
brew upgrade subversion
Others solutions require you to register an Account?? forget them.

Git not working. Installed XCode

Using an iMac running OSX 10.8.5 (Mountain Lion). It's a work computer and can't upgrade to a higher OS version at the moment for various reasons.
I tried installing XCode so that I can use Git but it isn't working.
In terminal I run:
git --version
and get this response:
-bash: git: command not found
What am I doing wrong?
You need to install git separately:
http://burnedpixel.com/blog/setting-up-git-and-github-on-your-mac/
Source control was only introduced into Xcode 4. This however does not mean git is installed onto your system as part of downloading Xcode. It just means that you can use some git features in a Xcode project by pressing the source control button at the top. To install the actual git go here.
I'm don't know why it appears to be so, but it looks like Git still isn't installed on your computer. Another way to check if Git is installed is by using the which git command. If that still doesn't help, install it separately. Download Git for Mac.

GitHub for Mac no longer installs Git message

I have been using the Github for Mac app and it works great.
This morning while launching the Github app I get the following message:
GitHub for Mac no longer installs Git
OS X 10.9 and later includes Git, so GitHub for Mac will no longer
install Git as part of its command line tools.
The version of Git you have installed through GitHub for Mac is no
longer supported. It's recommended that you uninstall it as soon as
possible.
[ Uninstall Git Later] [ Uninstall Git Now ]
Should I uninstall Git? Will I lose my git configs ?
Yes, you can uninstall Git (the one oncluded by GitHub for Mac)
You won't loose any configuration, unless you have been fiddling with git config --system.
Only the "system" config would have been modifying the installation folder of that embedded Git.

Git for Mac fails to launch: "illegal instruction"

...I've looked pretty carefully (I believe), and have been unsuccessful at getting an installation of Git for my Mac.
For various reasons, I'm running 10.6.8 of Mac OS X and will not be changing that anytime soon.
I've already gathered and installed the bundle exposed here:
https://help.github.com/articles/set-up-git
The installation instructions are pretty clear, and it's obvious to me that the package installed. But any attempts to use the git client from the command line result in an "Illegal Instruction" error.
I've sifted pretty carefully through information available here:
http://git-scm.com/book/en/Getting-Started-Installing-Git
There is another bundle that seems to be available. It is called "GitHub for Mac 1.7.5, but it appears to require Mac OS X 10.7 or later.
Has anyone else encountered this difficulty? Must I build from source?
I'm a couple of hours of reading and hacking into this effort? Is there something obvious that I've not considered?
Yes, I've had the same exact problem, and what I did is installed an earlier build from here:
https://code.google.com/p/git-osx-installer/
I'm running 10.6.8 and installed the newest build there, 1.8.4.2
SourceForge only has 1.9.0 and 1.8.5.2
http://sourceforge.net/projects/git-osx-installer/reviews?source=navbar
Someone on the reviews said they had trouble with both and went back to 1.7. I would try that if 1.8.4.2 doesn't work.
I was able to run the config commands without an illegal instruction error, at least.
I had this problem and was able to install a working version using Homebrew.
# first uninstall the broken version
# mount the DMG for the broken version using Finder
# "type" this with the tab key! it saves typing and fixes the version number
cd /Volumes/Git\ 2.0.1\ Snow\ Leopard\ Intel\ Universal/
./uninstall.sh
# make bash forget about the uninstalled binary
hash -r
cd
# now install the working version
# assumes you have Homebrew installed
brew install git
git version
I had this today on Snow Leopard after running the suggested git installer from git-scm. Really horrible. Found that installing Macports using their old Snow Leopard package and then
sudo port install git +svn +doc +bash_completion +gitweb
installs git plus its dependencies and git now works fine; version 1.9.3 installed and working on 10.6.8.
I had the same problem. There are various methods for downloading and installing git - Try macports or homebrew. The thing that finally worked for me was having xcode 3.2.6 installed with the additional command line tools - version 3.2 that comes with the leopard install disk wasn't enough. You can install xcode etc. from the disk and then run software update to upgrade it to 3.2.6.
The latest build for Snow Leopard in the official git-osx-installer repo is Git 2.3.5 currently. You can download it from http://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-snow-leopard.dmg/download using web browser. This installation works for me on OS X 10.6.8.
Or you can check yourself for a newer version: http://sourceforge.net/projects/git-osx-installer/files/
Yes - it seems that it does not support the older OS version (mine was 10.6.8). I upgraded to the newest Mac OS 10.9.4 (the installation will take a while), reinstalled the Git software (note that it will ask for xcode to be installed, which I proceeded), and everything works fine from there. Hope this helps.
Ref : https://help.github.com/articles/does-github-for-mac-run-on-os-x-10-6-snow-leopard
To quote:
Does GitHub for Mac run on OS X 10.6 Snow Leopard?
No, GitHub for Mac requires OS X 10.7 (Lion) or higher.
We made this decision because the app relies on a number of
technologies which are not available in Mac OS X 10.6 or earlier. We
want to provide the best experience possible for the app's users, so
we've made the choice to only support 10.7 and above, and not make
earlier versions available.

Does Xcode 4 install git?

I bought a new MacBook Pro and installed the applications list below in order. On my old MacBook, also running OS X 10.6.6, I didn't have /usr/bin/git, however, on the new MacBook Pro, I do. The only differences that I can think of between the two systems are:
New MacBook Pro has Xcode 4 vs. Xcode 3 on old MacBook
New MacBook Pro installed git using homebrew vs. old MacBook installed [git-osx-installer][]
Homebrew installed git 1.7.4.1 into /usr/local/Cellar/git and symlinked it into /usr/local/bin. This leads me to believe that Xcode 4 installed git 1.7.3.4 into /usr/bin. Can anyone confirm or deny this?
If Xcode 4 didn't install git 1.7.3.4 into /usr/bin, any thoughts what program did?
Applications Installed in Order
First boot
Ran Apple's Software Update
Ran Bootcamp to create 48GB NTFS partition for Windows 7
Installed iWork '09 and ran software update to install iWork Update 5
Installed TextExpander 3.2.4
Installed Dropbox 1.0.20
Installed 1Password 3.5.9
Installed Alfred 0.8.2 (107)
Installed Adium 1.4.1
Started installation of Xcode4 via App Store
Installed Caffeine 1.1.1 via App Store
Installed Kindle via App Store
Completed installation of Xcode 4 via App Store
Installed Homebrew using the following command:
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Installed git using brew install git
Installed MacVim using brew install macvim
Update: Package Receipt Info
I ran pkgutil --file-info /usr/bin/git and the following info was displayed. This appears to incriminate Xcode 4.
volume: /
path: /usr/bin/git
pkgid: com.apple.pkg.GitLeo
pkg-version: 4.0.0.9000000000.1.1248867338
install-time: 1300459157
uid: 0
gid: 0
mode: 755
Why It's a Problem that Xcode 4 Installs git
By default, the path /usr/local/bin is after /usr/bin (see the file /etc/paths). This means that git 1.7.3.4 is used instead of 1.7.4.1 that Homebrew installed.
Yes, it does. I just finished the Xcode 4 install. git was previously installed to /usr/local/git.
I am new to OS X, and can only suggest swapping the order of those directories in /etc/paths.
Not sure what else would/might work.
Under Preferences, Downloads there was an option for Command Line Tools. I installed that and it worked well.
I just looked into this and found git in /Applications/Xcode.app/Contents/Developer/usr/bin after installing Xcode from the App Store on 10.7.4. Adding that directory to my PATH seems to have done the trick.
I had to install the command line tools. Here's a helpful answer https://github.com/mxcl/homebrew/issues/10244#issuecomment-4013781
Xcode 4 installs git at /Developer/usr/bin and at /usr/bin. Xcode 4 uses the version at /Developer/usr/bin. I believe Xcode 4 also invokes git with a full path, so changing the path variable won't change the version of git being used by Xcode 4 itself. Of course, if you are just using git outside of Xcode, none of this matters.
I have been dealing with that same problem. Since I added the new default push style to my git command several programs have been failing because they were still using some internal old version of git.
I think I gave a good temporal solution here:
https://apple.stackexchange.com/a/72524/26545

Resources