NOOBZRME
NOOBZRME

Reputation: 11

Restoring local Git repo PC from network share

Super simple I'm sure but I just can't wrap my head around it. My computer failed which housed my git software. I have a remote git repository that I pushed changes to. I can't figure out exactly how to retrieve that remote repository back to my local computer since I have reinstalled git. For starters.....do I recreate a folder on my computer and run "git init" within that or "git init bare"? Also, would I clone the remote repo or would I merge or???

Upvotes: 1

Views: 26

Answers (2)

John Bupit
John Bupit

Reputation: 10618

You would clone the repository.

git clone <Remote repo's URL>

The URL must follow the ssh, git, http, https or ftp (deprecated!) protocol. It can also be a local file, if the -l flag is used.

Upvotes: 0

Thywen
Thywen

Reputation: 31

You first have to get the URL of the repository (if you are on github you can find it on the repository page)

And then just enter:

git clone <remote url>

Upvotes: 1

Related Questions