6

I am quite new to github. I worked on a project which has multiple folders. Now when I try to push the local repo to github, only the files in the root are getting pushed (Not the files inside folders).

I am following these commands

git add .
git commit -m "message"
git push -u origin master

Can someone point out the actual commands

EDIT: Sample Folder Structure

root
/Folder1/File1.txt
/Folder1/File2.txt
/Folder1/File3.txt
/Folder1/SubFolder1/File.txt
/Folder2/File1.txt
/Folder2/File2.txt
/Folder2/File3.txt
/Folder3/SubFolder1/File.txt
/README
/index.php
4
  • 3
    That is not possible since you are using git add .. Give sample folder structure and output of git status Commented Jan 6, 2012 at 5:55
  • 1
    Can you add the output of git status before and after you run the git add, like this... git status git add . git status ? Commented Jan 6, 2012 at 6:01
  • Also to add to the other guys - does git push give an error? Commented Jan 6, 2012 at 6:10
  • Does the result of commit show the files inside the sub directories? Commented Jan 6, 2012 at 8:57

2 Answers 2

10

Try using git add -A. This should add everything including those files that are untracked.

Sign up to request clarification or add additional context in comments.

Comments

-1

delete the old .git then do git init then git add -A if this didnt work check .gitignore by doing git status --ignore

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.