How to commit a folder to gitHub

20,505

Solution 1

Try this :

git add myfolder
git commit -m "some message"
git push

Solution 2

git add FOLDERNAME

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

Solution 3

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. )
Share:
20,505
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    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.