2

I'm trying to add every single thing I have in directory through git. However, for one particular directory, it loads the folder, but none of the contents. I tried to use

git add -A 

but was returned

# 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: sendgrid-php (untracked content) # no changes added to commit (use "git add" and/or "git commit -a") 

upon trying to commit my changes. What could be the problem here?

2

2 Answers 2

1

Directory sendgrid-php is git submodule, so git will not track content inside it, unless you will CD into it and commit them.

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

6 Comments

I tried to commit while in the subdirectory, I'm told I'm ahead by one commit, and that I have nothing to commit.
Have you staged changes in subdirectory (via git add -A) ?
Yeah, I do that and still get the # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # nothing to commit (working directory clean)'
CD back to your project directory, there shouldn't be any untracked content now.
I CD into the subdirectory, run 'git add .' , CD out into the project directory, try to commit, and get '# On branch master nothing to commit (working directory clean)' . This also happens when I run 'git add -A'. However, when I navigate to my domain, and then add '/send-grid.php', all it shows is a hyperlink to 'Parent_directory'
|
1

One possible way would be

git add directory/* 

or if you have already commited files from that directory before you can just make a

git commit -a 

That will add and commit all modified files.

3 Comments

When using your first suggestion, I get 'fatal: Path 'sendgrid-php/MIT.LICENSE' is in submodule 'sendgrid-php''
Do you have another git repo in the directory 'sendgrid-php'? The error message suggests that that directory is part of a git submodule (git-scm.com/book/en/Git-Tools-Submodules).
I think I may, but I'm not sure how to address it in terms of committing it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.