Home > Software engineering >  how to find git directory from ubuntu terminal
how to find git directory from ubuntu terminal

Time:11-06

I am currently in home directory and I need to use git. and I can't use git in home directory so I need to be in the git directory and I don't know where I installed git. I tried find git and locate git.

CodePudding user response:

I think this will help you:

sudo find / -type f -executable -name "git" 2> /dev/null

CodePudding user response:

I'm assuming you're looking for your Git sandbox, not the git executable. which git should tell you where Git is installed, but this command will find sandboxes in your home directory (assuming you created them in typical ways):

find $HOME -name .git

This would show you /home/me/projects/project1/.git if you had a Git sandbox called project1 located at /home/me/projects/project1.

  • Related