Create Git Ignore File with Nano Text Editor on Mac - VicPhanDevOps/mac GitHub Wiki

• Type git status and press the return key to get the file you want Git to ignore.
image

• Type nano .gitignore and press the return key to create the .gitignore file in the Nano text editor.
image

• Type # ignore < filename > file and press the return key to comment which file Git will ignore.
image

• Type the filename then press the control and X keys to exit.
image

• Press the Y key to save changes.
image

• Press the return key to save with the same filename.
image

• Type clear and press the return key to clear the Terminal.
image

• Type git status and press the return key and Git will now ignore the file you set it to ignore.
image

⚠️ **GitHub.com Fallback** ⚠️