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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,117
Community Members
 
Community Events
184
Community Groups

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

0 votes
Barry Allen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 20, 2020

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

Barry Allen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 21, 2020

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 

Barry Allen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 22, 2020 • edited

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 " "

Dhokia Rinidh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 27, 2023

Thank you so much, this has greatly helped me as well

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events