Reputation: 12438
I have copied an external folder containing some files to my repository
After that I run git status
and it showed that in the modified files as expected
..I run the git add .
..it didn't show any errors. Then I run git status
again to check if the files have been added to the staging area
Files weren't moved to the staging area. Why is it not moving this folder to the staging area? How may I move it to the staging area?
Upvotes: 2
Views: 1006
Reputation: 12438
I didn't remember that it jobtest
was a repository on it's own when I copied that into this repository of my own. I didn't want it as a submodule
so I removed .git
folder from it to make it an ordinary folder, add
ed and commit
ed and that's it. It all worked.
Upvotes: 1
Reputation: 104
Are You sure that directory jobtest contains files, because Git don't trac empty directories.
I You really need empty direcotry to be tracked, add at least one file jobtest/.gitignore with contents:
*
!.gitignore
Upvotes: 0
Reputation: 1323333
jobtest
is a submodule, not a regular folder.
You need to:
jobtest
, add, commit, push, As I explained in "Git diff says subproject is dirty", to get a clean status (ignoring the submodule state), you would need:
git status --ignore-submodules=dirty
Upvotes: 1