Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git doesn't see new files, only the folder

Tags:

git

file

commit

When adding a folder with some new files into my project and doing a git status, git only tells me about the folder and not the files. When I did a add -A only the folder and no files was added and when I push and pull, only the folder and not the files come through.

What am I doing wrong?

like image 557
Johan Dahl Avatar asked Oct 24 '25 11:10

Johan Dahl


1 Answers

Let's say you have the following untracked folder:

./fruits/
./fruits/apples.txt
./fruits/kiwis.txt

If you want to see the files inside the untracked folder:

git status -u

If you want to stage the untracked folder, together with the files inside it:

git add fruits/
like image 193
airimiea Avatar answered Oct 26 '25 03:10

airimiea