Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to check in which directory i have installed git in linux

for example, I have installed git in the directory. But I'm not able to find in which directory I installed

1 answer

In terminal, `which git` or `whereis git` will give your the git's executable file location. 

For example in my machine :

$which git

/usr/bin/git

$

Hi Allen, thanks for the answer. One more question. 

For example In an directory have initialized gitint and some files are getting track after few days again I came back and forgot the directory name

 Then I how I'll find this

Go to home directory and type the find . -name ".git" comment, it will list all the git repo in your computer. Check those list and find your repo.

 

$find . -name ".git"

find: ‘.-name’: No such file or directory

 

I'm getting this 

You need to give some space between "." "-name".

there are four part in this command and each part will be separated with space.

part1 = find (actual command)
part2 = . (dot means current directory)

part3= -name (command's args) 

part4= ".git" (file or directory name).

 

So the outcome is

$find . -name ".git"

$find(space).(space)-name(space)".git" #replace "(space)" with " "

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in DevOps

GitHub Script with GitHub Actions Automating Workflows

Hello folks, This is a series of articles where I explain GitHub Script with GitHub Actions and how you can automate publishing data on Atlassian & GitHub Platform based on the results of Workf...

119 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you