My favorites | Sign in
Project Logo
             
Search
for
Updated Jul 12, 2009 by timcharper
BuildYourOwn  

The git repo contains the build script that I have been using.

git clone git://github.com/timcharper/git_osx_installer.git

Comment by liveloveprosper, Nov 01, 2008

how do we upgrade git?

how do we uninstall? if I delete the folder here: /usr/local/git, and I delete the git files here /etc/paths.d and here /etc/manpaths.d, then will git be completely uninstalled? or were there other changes made when i installed it?

thanks! :)

Comment by timcharper, Nov 22, 2008

Yes - you are correct

/usr/local/git/**/*
/etc/paths.d/git
/etc/manpaths.d/git
Comment by liveloveprosper, Dec 13, 2008

Thanks!

I noticed there's a newer version. Is there an easy way to upgrade, or should I just uninstall as instructed and reinstall the new version?

Also, if I have mac ports installed, do u recommend I do <code>sudo port install git-core +svn</code> or should i used the git-osx-installer. and why?

I know I can also compile from source, but I'm lazy and don't really care that much how it all works... :)

Comment by sarahannalien, Jan 07, 2009

Will there be any x86_64 builds? Or will I need to build my own? We're having a problem where very large files (a couple gigs or more) are crashing due to mmap() failures, and are wondering whether or not a 64-bit build would fix the problem. I'm willing to build it myself, assuming it's feasible, but we've heard of other people on the net having similar problems, so perhaps a 64 bit build isn't an unreasonable request?

Comment by sarahannalien, Jan 07, 2009

Okay, we did our own 64-bit build and it seems to work fine. My notes are below... not as a recommended approach, just something of a record of what we did here.

We didn't try to package it up into a .dmg, I just tarred up the directories

/usr/local/git// /etc/paths.d/git /etc/manpaths.d/git

and handed it off to the person who needed it, who reported back that after unpacking the pieces and putting them in the right place, things worked just fine.

FYI.

Sarah

##
##  First, downloaded and installed the Git 1.6.1 from .dmg at:
##
##  http://code.google.com/p/git-osx-installer/downloads/list
##
##  Then, try to rebuild as 64-bit...
##

git svn clone  http://git-osx-installer.googlecode.com/svn/ --stdlayout
cd svn

##
##  Read BuildInstructions.txt
##  Read build.sh
##

sudo UserScripts/cplibs.sh
# This fails... problem? Or no, because Git 1.6.1 already installed libs?
Password:
UserScripts/cplibs.sh: line 6: pushd: /opt/local/lib/: No such file or directory
cp: libcrypto.0.9.8.dylib: No such file or directory
cp: libz.1.2.3.dylib: No such file or directory
cp: libssl.0.9.8.dylib: No such file or directory
cp: libexpat.1.5.2.dylib: No such file or directory
ln: libcrypto.dylib: File exists
ln: libz.1.dylib: File exists
ln: libssl.dylib: File exists
ln: libexpat.dylib: File exists
UserScripts/cplibs.sh: line 20: popd: directory stack empty


curl -O http://kernel.org/pub/software/scm/git/git-1.6.1.tar.bz2
 
tar jxvf git-1.6.1.tar.bz2

cd git-1.6.1

vi Makefile
# ... added NO_DARWIN_PORTS=1 to top of file ...

# ... testing that the basic build works...
make LDFLAGS="-L/usr/local/git/lib,/usr/lib" prefix=/usr/local/git all
make LDFLAGS="-L/usr/local/git/lib,/usr/lib" prefix=/usr/local/git clean

#... now try 64-bit build ...
make CFLAGS="-arch x86_64 -mmacosx-version-min=10.5" LDFLAGS="-L/usr/local/git/lib,/usr/lib" prefix=/usr/local/git all

make CFLAGS="-arch x86_64 -mmacosx-version-min=10.5" LDFLAGS="-L/usr/local/git/lib,/usr/lib" prefix=/usr/local/git strip

sudo make CFLAGS="-arch x86_64 -mmacosx-version-min=10.5" LDFLAGS="-L/usr/local/git/lib,/usr/lib" prefix=/usr/local/git install

# ... are we 64-bit now? ...
$ lipo -detailed_info `which git`
input file /usr/local/git/bin/git is not a fat file
Non-fat file: /usr/local/git/bin/git is architecture: x86_64
# ... why yes, yes we are! ...


##
## Okay, now continuing with instructions from BuildInstructions.txt
##

# contrib
sudo mkdir -p /usr/local/git/contrib/completion
sudo cp contrib/completion/git-completion.bash /usr/local/git/contrib/completion/

# change hardlinks for symlinks
cd ..
sudo ruby UserScripts/symlink_git_hardlinks.rb

curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.6.1.tar.bz2
sudo mkdir -p /usr/local/git/man
sudo tar xjv -C /usr/local/git/man -f git-manpages-1.6.1.tar.bz2

# add .DS_Store to default ignore for new repositories
sudo sh -c "echo .DS_Store >> /usr/local/git/share/git-core/templates/info/exclude"
Comment by airdrum...@wheel.org, Jan 08, 2009

so i've hacked my Makefile to avoid what i don't have(expat.h, tkl) but: $ make LDFLAGS="-L/usr/lib" prefix=/usr/local/git LINK git-imap-send /usr/bin/ld: Undefined symbols: ERR_error_string ERR_get_error

but i've got:

/usr/lib/libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.dylib /usr/lib/libcrypto.dylib

wtf?

Comment by anthony.webb, Jan 11, 2009

I've got the same questions as liveloveprosper, how best to upgrade?

Comment by exaos....@gmail.com, Mar 07, 2009

Why aren't there new packages for PPC? :-( I'm using PowerBook? G4 now. It's old but still works fine. Unfortunately, building packages is very slow on it. :-( Hope to download newer PPC binary.

Comment by timcharper, Apr 10, 2009

exaos.lee - I'm still waiting for someone to step up to the plate, as I have no powerbook mac in my possession I'd be least qualified to perform the task.

Comment by timcharper, Apr 10, 2009

Re: how to best upgrade from a port install to the package installer, you've a few options:

A) Use the port uninstall feature, and then install the package.

B) Install the package, and then make sure the /opt/local/bin comes after /usr/local/git/bin in your path

C) Manually remove the old git, and all of it's support files. This can be dangerous as you must be root to perform the task. You may wish to create a backup before you let a wood-chipper loose in the forest.

Comment by timcharper, Apr 10, 2009

Uninstallation instructions for the package are included in the disk image. But, since they are brief, I will simply confirm that you are correct, liveloveprosper

rm -rf /usr/local/git /etc/paths.d/git /etc/manpaths.d/git

# careful!  rm -rf is DANGEROUS
Comment by clubjuggler, Jun 01, 2009

Note, btw, that for those wanting 64 bit versions or ppc versions, I uploaded a build.sh to  Issue 20  that will automatically create full universal binaries (ppc/ppc64/i386/x86_64) when building.

Comment by square.grip, Jul 25, 2009

I installed git through the dmg installer on this page. typing git command to install some textmate bundles gives me : git - command not found. is there anything else i have to do to make it work?

Comment by PERL.programmer, Aug 28, 2009

Updating to snow leopard, you will need to re-create the /etc/path.d/git and /etc/manpaths.d/git files, since apparently they get deleted in the process.


Sign in to add a comment
Hosted by Google Code