Add File to Git Ignore with Nano Text Editor on Mac - VicPhanDevOps/mac GitHub Wiki
• Type git status
and press the return key to see the file you wish to ignore.
•
• Type nano .gitignore
and press the return key to open the .gitignor
e file in the Nano text editor.
•
• Press the down arrow until the cursor is at the bottom of the file.
•
• Press the return key to create a new line, type # ignore < filename >
and press the return key to comment which file to ignore.
•
• Type < filename >
and press the return key, then press the control and X keys to exit the text editor.
•
• Press the Y key to save changes.
•
• Press the return key to save the file with the same filename.
•
• Type clear
and press the return key to clear the Terminal.
•
• Type git status
and press the return key and the file will no longer appear.
•