Jake
Jake

Reputation: 29

How to access github repository

I am brand new to github. I made a repo a week ago and already forgot how to access it from the mac terminal. So I just made a clone of a github repository online, how do I access that clone? Where is located? Thank you.

Upvotes: 1

Views: 3591

Answers (3)

myselfmiqdad
myselfmiqdad

Reputation: 2605

Using the terminal. 'cd' into the directory in which you wish to clone the project.

Once in the directory. You have to initialize git using

 git init

At this point, if you have any files in that folder you can add them using

git add .

The . means all files, if you wish to specify specific files then it is

git add index.html

once you have added. You commit using.

git commit -m "first commit"

Once committed, you add it to remote

git remote add origin {like to your repo}

Last step is to push it, using

git push -u origin master

Master referes to the master branch.

If you want a simple way out. use https://desktop.github.com/

Upvotes: 3

Karthikeyan Velmurugan
Karthikeyan Velmurugan

Reputation: 631

I think this will help you, follow the steps given below

Upvotes: 0

alebian
alebian

Reputation: 782

When you write in the terminal:

git clone 'url of your repo' 

It will make a copy of it inside the current directory. I don't know where you typed the command but it will be there. If you used one of those programs with visual interface you probably should look in the preferences, if it didn't ask you where you wanted to clone the repo it probably has some default.

Btw: even if it's harder at the beginning.. Learn how to use git from the command line

Upvotes: 0

Related Questions