That’s because files and directories that starts with a . are hidden (e.g: .DS_Store, .bash_history )
In order to view these files in finder, you need to run the following command
defaults write com.app.Finder AppleShowAllFiles YES
After running that command, you should then be able to view the hidden files and directories in finder.
To revert the changes you just made, you can run the following command
defaults delete com.app.Finder AppleShowAllFiles