We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Bitcoin Barons • 10 years ago

works great thank you

Sean Juarez • 11 years ago

This actually doesn't work like seems... Bluehost has git installed by default in /usr/bin/git (as David Lichtenberg observed below). You can verify this by running which git from the command line.

The problem is that the version of git that Bluehost provides is pretty old (1.7.11.3). After following the steps above, running git --version will still report git version 1.7.11.3 meaning the latest version of git that you just downloaded isn't the one being used.

To remedy this you'll need change the export in your .bashrc (that you entered in step 4) to:


export PATH="$HOME/.local/src/git-master:$PATH"

Then just exit and log back in and you should be good to go. Running which git should return /[home]/[username]/.local/src/git-master/git.

Optionally, if you want to install git somewhere else—in .local/ for example—you can run the following commands (as documented on git's Getting Started page):


$ make prefix=~/.local/git all
$ make prefix=~/.local/git install

and then changing the export in your .bashrc:


export PATH="$HOME/.local/git/bin:$PATH"

Hope this helps.

BrendonBrown • 11 years ago

To anyone reading this, I can confirm as of today that this is still necessary to access the new git install. Thanks Sean.

Brian Mayer • 11 years ago

now 6 months later, confirming that this is STILL the case. and Sean's fix is still necessary

benw301 • 11 years ago

2 month after ^ still necessary, thanks Sean!

kayoti • 10 years ago

2 months after still the same case

Yoel Simhovitch • 9 years ago

Still the case, your solution worked! thanks.

Smartronsc • 7 years ago

Still need to.

Mike • 11 years ago

I also think the "src" directory is bad practice and having binaries in it is misleading. "src" should be for code, not binaries. Instead, the article should make a "bin" directory.

After running the make/install, it seems that git does install to "~/bin", so the user should add that to the $PATH, not "/.local/...".

A.Rachdi • 11 years ago

Great !

Guest • 11 years ago

on 9/3/2014, at step 10 "$ make" I receive the error

GIT_VERSION = 2.1.0.GIT
* new build flags
CC credential-store.o
/bin/sh: /usr/bin/cc: Permission denied
make: *** [credential-store.o] Error 126

and can't proceed past that point.

Michael Mathews • 11 years ago

i have a 127 error :/

Taj Uddin • 9 years ago

How you solved this problem ? i am also getting the same.

David Lichtenberg • 12 years ago

Thanks for the posting this!
Why did we add .local/bin to our path? Following the instructions, I ended up installing git to /usr/bin/git
Was there some argument I was supposed to pass to make?

Taj Uddin • 9 years ago

I am getting below error when i am trying to run make command

GIT_VERSION = 2.9.0-rc2
* new build flags
CC credential-store.o
/bin/sh: /usr/bin/cc: Permission denied
make: *** [credential-store.o] Error 126

Can anyone please help me.
Thanks in advance.

Zero to Hero Languages • 10 years ago

Thank you so much!!!

Kristin Low • 11 years ago

That actually worked - fantastic & huge help - thanks so much!

Mohammad Abdul Sami • 11 years ago

great...thanx

Suman • 12 years ago

Awesome sir, Works perfect.

crixlet • 12 years ago

Wow. Awesome x2000. Worked perfectly. Thank you!

Neolamanite • 12 years ago

Nice post. I finally have git on my bluehost account. Thank you!

Stephanie Clark • 12 years ago

Super easy! Thanks for the post!

Guest • 12 years ago

excellent

Jon Bolden • 12 years ago

So helpful and easy. Thanks!

BrendonBrown • 12 years ago

I've been stuck on this for the longest time. Thank you, sir!

Sultan Mahmud • 12 years ago

Thank you so much. great tutorial!

Steve Hanson • 12 years ago

Works great! Thanks so much! It's great to now have git setup for my website src!

Martin Coulombe • 12 years ago

Awesome post! Just works. Thanks a lot!

shacharOz • 7 years ago

after this process , can i continue working with the git folder with an external gui system like gitkraken or github desktop?
or must i connect manually to ssh each time i need to commit?

Wu TingYu • 7 years ago

thanks a lot!! I read BlueHost document: "VPS or Dedicated Hosting - Installing Git", and try to install git. It was not worked. Finally I read this topic, it's works great!! thanks!

bbbent • 8 years ago

I see a lot of notes about these steps not working, but they worked perfectly for me just now. Thanks!

Zero to Hero Languages • 10 years ago

Thanks so much!

Michael Mathews • 11 years ago

Works on a godaddy hosting?

Guest • 11 years ago

works on a godaddy shared hosting

Brice Bentler • 11 years ago

Worked for me! I had no idea you could do this on shared hosting!!!