git does not add empty files to source control. Try adding some content to the file dir-name/file.txt and then try
git add dir-name/file.txt