How to create the. gitignore file in Windows Explorer

Source: Internet
Author: User
Tags windows x86

How to create. gitignore file

I need to add some rules to my .gitignore file, however, I can ' t find it in my project folder. Isn ' t it created automatically by Xcode? If not, what command allows me to create one?

' XXX '

To get around this I used the following steps

    1. Create the text file Gitignore.txt
    2. Open it in a text editor and add your rules, then save and close
    3. Hold SHIFT, right click on the folder you ' re in, then select Open Command Window here
    4. Then rename the "file" in the "command line," withren gitignore.txt .gitignore

The easiest-to-create the. gitignore file in Windows Explorer was to create a new file named

.gitignore.

This would skip the validation of having a file extension, since is actually have an empty file extension.

========== in WINDOWS ==========
    1. Open Notepad.
    2. Add the contents of your Gitignore file.
    3. Click "Save as" and select "All Files".
    4. Save as .gitignore .

======== Easy peasy! No command Line required! ========

In Windows, open a DOS prompt (cmd) Windows, with command line:

Type >. gitignore
Few ways to create. Gitignore using cmd:
    • With copy con command:

      1. Open cmd and say to cd your git repository
      2. Say and press copy con .gitignore CTRL + Z.
    • With start notepad .gitignore command:

      1. Open cmd and say to cd your git repository
      2. Say and press start notepad .gitignore Yes button in opened Notepad dialog box.
    • With edit .gitignore command (Windows x86 only):

      1. Open cmd and say to cd your git repository
      2. Say and edit .gitignore Close opened edit editor.

If you use Sublime as your IDE, you can create a new file and save it as. Gitignore.

Simply Using CTRL N for the new file, and Ctrl S to save as ". Gitignore".

I use notepad++. New File > SaveAs >. gitignore (Save as type, all types (.))

How to create the. gitignore file in Windows Explorer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.