I downloaded git source from https://github.com/git/git as a zip file.
I extracted it into /home/Desktop/denis/git (using Ubuntu).
Now the tutorial here says that I should run
./configure --prefix=/home/denis/git-static CFLAGS="${CFLAGS} -static"
from the above mentioned folder as a step for building git.
But the git source does not appear to have a configure file in it's root folder which I can run (only configure.ac, which I suspect is not what I'm looking for).
What am I missing here? How to build git manually?
I'm doing this because I'm trying to get git working on a shared hosting server where I'm not able to install git.
The other answers did not work for me. Perhaps they will for others. What did work for me was:
Use the following commands:
git clone [email protected]:git/git.git
mkdir git-static
cd git
./configure prefix=/path/to/git-static/ CFLAGS="${CFLAGS} -static"
make
make install
This will leave you with a few folders in the git-static
directory, but the executable is statically linked. It is also substantially bigger than usual (maybe 1.5 MB bigger).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With