In some cases you want to install git where you are only a user,  the .bashrc is not being interpreted, and sshd does not allow you to send the path variables, in short a locked down system. What you do in this case, you unpack the binary packages into some path, and prepend that path via a git ssh command script to your ssh command. Here we do this for sdf, the superdimensional fortress that gives you lifetime shell and web hosting for $36 one time fee ( It is running netbsd 6.0 on an amd64 machine , so we fetch the binaries right off the server.

How to install git on sdf as a arpa member :

  1.       mkdir ~.local
          cd ~.local/
          tar -xzf git-2.10.0.tgz
          tar -xzf git-base-2.10.0.tgz
          rm *.tgz
  2. On your client machine :
      1. Setup your ~/.ssh/config
      2. Host sdf
        	  User h4ck3rm1k3 
      3. Setup ssh login script to prepend path
        	    shift # remove the hostname that is arg1
        	    # now we set the path and call the command without the hostname
        	    # host name is sdf that is configured in the .ssh/config
        	    exec /usr/bin/ssh sdf "export PATH=/sdf/arpa/gm/h/h4ck3rm1k3/.local/libexec/git-core/:/sdf/arpa/gm/h/h4ck3rm1k3/.local/bin:/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin;$@"
      4. Setup your git config to use custom login script
        	    repositoryformatversion = 0
        	    filemode = true
        	    bare = false
        	    logallrefupdates = true
        	    [remote "origin"]
        	    uploadpack = /sdf/arpa/gm/h/h4ck3rm1k3/.local/libexec/git-core/git-upload-pack
        	    url = ssh://sdf:/sdf/arpa/gm/h/h4ck3rm1k3/html