Home windows How to create a .Gitignore file in Windows?

How to create a .Gitignore file in Windows?




When I try to create a file .Gitignore in Windows, leads to an error:

How can I create a file .gitignore ?

Answer 1, Authority 100%

  • You can create a file .Gitignore. , with a point at the end. The point in the end disappears automatic way.

  • It is also possible to create a file using cmd.exe :

    type nul & gt; .Gitignore.

Answer 2, Authority 43%

  1. Create a Gitignore.txt file
  2. edit in the text editor to taste
  3. Next Shift + right click mouse inside the folder where the file is
  4. choose “Open Command Window Here” or how it is there in Russian
  5. will start cmd.exe already in this folder. You write Ren Gitignore.txt .Gitignore , the file is renamed.

Answer 3, Authority 38%

You can download Ready .Gitignore with GitHub. There is a special repository in which .gitignore templates are saved for different languages ​​and frameworks.


Of course, then it can be edited, even leaving empty at all.

GitHub itself uses this repository when it offers to add .Gitignore to the newly created repository. Therefore, the link will almost certainly be breaking.

from Git Bash or Cygwin work the following ways:

touch .gitignore
echo '' & gt; .Gitignore.

Answer 4, Authority 5%

Well times Total Commander, then:

  • go to the desired folder
  • Click Shift-F4, enter the file name as there is .gitignore , click ENTER
  • opens the editor specified in the Total Commander settings (some lightweight syntax editor, for example)
  • prescribate content, click Save

Actually, all. No manipulations with the file name are not needed.

Answer 5

Total Commander and all operations with folders and files

All sorts of different file operations are classified in Windows 98 – Windows 10 in your favorite editor: Total Commander

  • [x] Create .Gitignore.txt
  • [x] Double click on file name
  • [x] delete selected .txt
  • [x] confirm by pressing

p.s. – Always check the file encoding: UTF-8

Answer 6

There is a simple option, create a regular text file .txt, it does not matter how to be called, then open it, go to the Save section as, then enter the name of the Fail .Gitignore file, then below in the “Faila Type” section Choose all Failers . and everything, renamed

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions