Home Download Buy Blog Forum Support

Cloning repo

Cloning repo

Postby agibsonsw on Fri Oct 05, 2012 5:51 pm

Hello. Still getting used to GitHub and I would like to tap into the knowledge of others. I'm on a different computer. If I create a folder with the same name as my repo, chdir to this folder, then:

git init
git clone https://github.com/agibsonsw/myrepo


Will these copy all the repo files to my current folder? I can then amend files 'git add' and push them? It will ask for my username and password and update my repo.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Cloning repo

Postby xeno.by on Fri Oct 05, 2012 7:39 pm

"git init" is unnecessary. It's used to create a new repository. Since you already have one, you only need to do clone. And since you're doing clone, mkdir is unnecessary as well - clone will create a directory for you.

Other than that, yes, it should work like you described.
xeno.by
 
Posts: 106
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Cloning repo

Postby agibsonsw on Fri Oct 05, 2012 8:23 pm

Thank you @xeno.by
So if I navigate to C:\Users\Andrew on my Windows computer and then clone it will create a folder with the same name as my repo? I'm just clarifying this once more as I don't like ending up with unnecessary (sub)-folders. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Cloning repo

Postby xeno.by on Fri Oct 05, 2012 8:40 pm

Yes, it should create a folder named the same as your repo.
xeno.by
 
Posts: 106
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Cloning repo

Postby agibsonsw on Fri Oct 05, 2012 8:43 pm

xeno.by wrote:Yes, it should create a folder named the same as your repo.

Thanks again :)
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 29 guests