Skip to content

Latest commit

 

History

History
79 lines (46 loc) · 770 Bytes

Create_a_gitignore.md

File metadata and controls

79 lines (46 loc) · 770 Bytes

How to create a .gitignore file

I'm jotting it down so as not to forget how to create a .gitignore later on



1. cd into your projects root directory


2. Create .gitignore file

touch .gitignore

3. Write it down using .gitignore patterns

ex)

  • To exclude all files ending in .log

    *.log
    
  • To exclude any file names that contain .log

    *.log*
    
  • To exclude all files in a specific path

    /Build/*
    


+

If you create a .gitignore when in use

git rm -r --cached .

git add .

git commit -m "git ignore add"

git push


.gitignore example

*.bash_history

*.gitconfig

*.python_history

.c9/

.cache/

.local/