1

I m trying to push a repository to github.com . After following their instructions

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/VihaanVerma89/RandomSolutions.git
git push -u origin master

I see that my project bin and src folder are empty on github , a similar problem solved this issue by

git add .

However after following this advice I still see that some files are not getting staged for commit. gitk shows Local uncommited changes, not checked to index (check the last image). enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

8
  • What does your .gitignore say? Commented May 28, 2013 at 21:46
  • I haven't put anything in .gitignore. Commented May 28, 2013 at 21:48
  • It seems like git add . should work...what happens if you do git reset HEAD && git add .? (Make sure you don't include the --hard option when you reset) Commented May 28, 2013 at 21:49
  • I tried that but it doesn't seem to help :\ Commented May 28, 2013 at 22:01
  • And you're not doing anything between git add . and git status (e.g. building)? Commented May 28, 2013 at 22:04

1 Answer 1

3

From the screenshot of your first commit in github, bin and src were tracked by git as submodules.

That is to say, when you were adding all the files, there were .git directories in bin and src. So the simplest way to solve your problem is delete all .git directories except the root one.

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

1 Comment

right on man ! . I guess I even tried adding the src/ and bin/ manually with each files name , may be that created an additional .git directory in the sub folders.

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.