windows cmd touch command code example Example: touch command in windows type nul > .gitignore ---This creates empty file and works on windows 10.