Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to commit a folder to gitHub

Tags:

github

commit

I am new to GitHub, able to create a README textfile and commit that (from my local machine to github site) but now my problem is, i have one folder and i need to commit that folder to git hub, can any one of you help m e on this.

like image 548
user1126212 Avatar asked Jan 03 '12 10:01

user1126212


3 Answers

Try this :

git add myfolder
git commit -m "some message"
git push
like image 76
sailor Avatar answered Oct 07 '22 00:10

sailor


git add FOLDERNAME

After that, you can do a normal commit + push as you did it with the README file.

like image 22
sascha Avatar answered Oct 06 '22 23:10

sascha


Its very simple. Follow some steps-

  1. Just click on the Upload files button.
  2. Now you can see a window where you can drag or upload the files.
  3. Just drag your required folder and it will upload in the repository (don't click on the choose your files button, it will upload your files only, not folder. )
like image 27
Gaurav Tripathi Avatar answered Oct 06 '22 23:10

Gaurav Tripathi