Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the git repository that I cloned before?

Tags:

git

github

After cloning a git repository, How can I get the repository file?

for example)

After "git clone http://[email protected]/asdf/asdf.git"

I want to know the URL(http://[email protected]/asdf/asdf.git).

how can I do this?

like image 614
Sungguk Lim Avatar asked Nov 08 '11 13:11

Sungguk Lim


People also ask

Where do git clones go?

git clone is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location. The original repository can be located on the local filesystem or on remote machine accessible supported protocols. The git clone command copies an existing Git repository.

Where are cloned repositories saved?

By default, the clone command saves your code in a folder that shares the name of your repository. This can be overwritten by specifying a folder name after the URL of the repository you want to clone. Creating local copies of a Git repository stored elsewhere is a central part of the Git version control system.

Does GitHub keep track of clones?

Conclusion: Yes, the owner of a repository will see when someone makes a fork on GitHub, but no, they will not see it when someone makes a clone somewhere else.

What happens if you clone an existing repository?

Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch -r ), and creates and checks out an initial branch that is forked from the cloned repository's currently active branch.


1 Answers

You can use remote show, although it's gonna ask your key:

git remote show origin | grep 'Fetch URL'
like image 190
gustavotkg Avatar answered Sep 22 '22 04:09

gustavotkg