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
- Create the text file Gitignore.txt
- Open it in a text editor and add your rules, then save and close
- Hold SHIFT, right click on the folder you ' re in, then select Open Command Window here
- Then rename the "file" in the "command line," with
ren 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 ==========
- Open Notepad.
- Add the contents of your Gitignore file.
- Click "Save as" and select "All Files".
- 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:
- Open cmd and say to
cd
your git repository
- Say and press
copy con .gitignore
CTRL + Z.
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