Back

Explore Courses Blog Tutorials Interview Questions
+6 votes
2 views
in DevOps and Agile by (29.3k points)
edited by

I have a very basic github setup with a readme, a directory, and another directory inside it with an html file. On github, I can only view the readme and the first folder but none of its contents, and I am getting this message

git add *

git status

On branch master

Changes not staged for commit:

(use "git add <file>..." to update what will be committed)

(use "git checkout -- <file>..." to discard changes in working directory)

(commit or discard the untracked or modified content in submodules) 

modified:   week1 (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

I feel like if I am adding all to be staged that it should not be an issue. Any help?

1 Answer

+7 votes
by (19.4k points)

Try:

cd week1

git status 

the above command is used to see the changes that are made to the submodule can be displayed and

git add -A.

will add changes from all tracked and untracked files. Now all the changes are staged.

If you wish to get a clearer understanding of Git, you can also enroll for Git Training

by (50.2k points)
edited by

Note: This is in the case when you are working on submodules.

If you change any file in the repos you need to commit the file again for that you could use:

git add <submodule-name>

git commit <submodule-name> -m"changed file"

This will allow you to commit only a subset of changes in that submodule and on a side note as @humblegumble answer says

 git add -A

This is a good option to commit everything.

for changes goto that directory and use 

git status 

This helps you to see the changes done to sub-modules.

For more information please go through the link given below that helps you in understanding concepts of git

Browse Categories

...