user9456654
user9456654

Reputation: 91

How to add a project to already existing repository

I am using codeigniter framework. I want to upload my project to github. I have username and password. In github i have a repository. I want to upload my project to that repository. I tried with git desktop. My system is 32-bit. So I tried with git bash using command promt. My project folder is on my desktop. I don't know how connect to that already existing repository to my local folder. I tried with lot of commands like

git init
git remote add origin https://github.com/yourusername/your-repo-name.git
git commit -m "adding files"

but my files are not upload to github. I am using codeigniter so, there are lot of files like applications, assets, Systems folder. I need to upload those folders with files. Please help me.

Upvotes: 2

Views: 916

Answers (2)

André Monteiro
André Monteiro

Reputation: 78

I guess what you want to do is to "download" the existing repository and then add files to it.

You should first clone your GitHub repository, and then add the files to it. After this, you can commit (and push) your files to the repo.

I recommend reading the Git basics:

Upvotes: 1

FreshD
FreshD

Reputation: 3112

This is a very nice description how to add an existing project to github.

For your issue that files are not added:
What I could see from your trial you maybe forgot to use git add on the files you want to add. To be sure you could post the output of git status

Upvotes: 2

Related Questions