No, Git will not track device files at all (currently). Here's a comment from
dir.c, read_directory_recursive (v18.104.22.168) function which is used when you do
git add .:
* Read a directory tree. We currently ignore anything but
* directories, regular files and symlinks. That's because git
* doesn't handle them at all yet. Maybe that will change some
Git tracks contents, not files. So trying to make it track device files doesn't really fit - they don't really have content in a traditional sense.
An approach that would work is to create a script that creates/"installs" the device files your application/project needs (including fifos or whatever else you might need). Git can track that very effectively, and it's a handy form to have that in for an installer (or for other people using your tree).