In I cannot create a file `.gitignore`!? It always says

> You must type a file name.

Also creating `.gitignore.txt` and then deleting `.txt` doesn't work...

Ufff... -.-

· · Web · 6 · 0 · 2

@blub @martin
yepp, just tested it successfully with the CMD:
copy con .gitignore
<Fill it with content or leave blank>
<CTRL+Z> then <ENTER>
This should do the magic.

@martin You have to change the `.txt` extension to `.gitignore`, while keeping the file name itself blank. You can do this by renaming with file name extensions shown in Windows Explorer, or using the Properties menu.

@darylsun mmh, i don't get it.. :/
i cannot find a way to create `.gitignore` (with an empty "file name", just the dot and an extension) from the GUI...

However, the command line suggestions work perfectly! thanks @irrelefant @toxision @blub


> ren .gitignore.txt .gitignore

Still... Always thrilling to see how much better Windows know what I want...

@martin Oh well, sorry I wasn't able to explain it better. But I'm glad you managed to find a solution. 👍

echo "" > .gitignore on the command line does the trick 😉

@martin type .gitignore. (dot gitignore dot),then enter. the second dot will disappear, it'll become .gitignore

@martin I hear you. Try to name a file AUX or COM and find yourself in the 90ies. I hope everyone sees here: Windows is a problem here, use a unix!

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!