I am using windows git bash.
I have a folder c:/myrepo and I have changed the directory to this folder in the Git Bash window. I executed the following command inside this folder
git clone https://dev.azure.com/myproj/_git/proj1
if I execute the command ls I see a directory proj1. The proj1 directory is empty because there are no contents yet.
I am copying a few directories, with some files inside those directories from another directory to the proj1 directory with the following command
cp -a C:/Projects/source/. C:/myrepo/proj1
There is no .gitignore file in any directory. Now, if I execute the command git status I see the following output
On branch master Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
I do not understand why git is not showing untracked directories and files I have copied.
EDIT
Based on the suggestion given at the SO thread Why doesn't git recognize that my file has been changed, therefore git add not working I executed the following steps.
I removed all the directories/files from proj1 diretory and then executed the following commands
git update-index --no-assume-unchanged .
and then
git rm --cached . -r
I copied back all the directories/files into proj1 folder. When I executed git status after these steps, I see the untracked directories/files. But when I do git add -A and then executed git commit it shows me the following message
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
After this, I deleted all the directories/files under proj1 directory and then executed git status. This time I could see deleted files in the untracked list. Also when I created a directory manually and then added a file inside it, I saw this file also in the untracked files output of git status command. I was also able to execute git add -A and commit the file successfully. It seems that mass copied files are not detected by git.