Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload local files to empty GitHub Repository Created By A Client

Tags:

git

github

My client has provided me with an empty GitHub Repository, I need to upload my local files to this repository, the problem is I don't see a "Clone" option in the GitHub page, is it because the repository is empty, I read that repositories needs to be initialized first with at least the ReadMe file or is it because I don't have permission to clone the repository because the client doesn't have my email/GitHub id or is it both?

PS: I have worked on couple of Git projects so I'm familiar with the command lines but I have never created a new repository. I have also installed GitHub Desktop on Mac and plan to use it instead of the command line option.

Thanks

like image 911
Raj Avatar asked Oct 16 '16 08:10

Raj


2 Answers

Initiate a git repository on your local

git init

Add remote url to git

git remote add origin [email protected]:USERNAME/REPOSITORY.git

Make you commits and push to remote

git push origin master

More explanation here.

like image 195
Shashwat Kumar Avatar answered Sep 18 '22 17:09

Shashwat Kumar


Since October 2018, you don't even need anymore to clone, add, commit and push to an empty GitHub repository: you can do so directly from the GitHub Web interface.

See "Create and upload files to empty repos":

Now when you create an empty repository, you will be presented with the ability to create files using GitHub’s online code editor or upload files directly from your computer.

like image 45
VonC Avatar answered Sep 18 '22 17:09

VonC