Skip to content

Instantly share code, notes, and snippets.

@eksrha
Created February 10, 2022 11:35
Show Gist options
  • Save eksrha/a76f32e098e8fe2b2626412c8a2629e2 to your computer and use it in GitHub Desktop.
Save eksrha/a76f32e098e8fe2b2626412c8a2629e2 to your computer and use it in GitHub Desktop.
Install git local as non root user
  1. clone the official git repo

    git clone https://github.com/git/git.git git-raw
  2. Change directory to the cloned repo cd git-raw

  3. create a new directory where we can store the compiled git resources mkdir -p /home/$USER/bin/git

  4. make sure that the file configure is executable

  5. install git as non root user

    ./configure --prefix=/home/$USER/bin/git/ && make && make install
  6. add the new bin folder to your PATH

    echo "export PATH=\"\$PATH:/home/$USER/bin/git/bin/\"" >> /home/$USER/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment