Sublime Forum

Cloning repo

#1

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

0 Likes

#2

“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.

0 Likes

#3

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.

0 Likes

#4

Yes, it should create a folder named the same as your repo.

0 Likes

#5

Thanks again :smile:

0 Likes