> For the complete documentation index, see [llms.txt](https://pyohamen.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pyohamen.gitbook.io/til/git/git_basics/git_ignore.md).

# Git\_ignore

## How to use gitignore

### 1. `cd` into your projects root directory

### 2. Create `.gitignore` file

```
$ touch .gitignore
```

## 3. Write it down using `.gitignore` patterns

ex)

*
* To ignore all files ending in `.log`

  ```
  $ echo '*.log' >> .gitignore
  ```
* To ignore any file names that contain `.log`

  ```
  $ echo '*.log*' >> .gitignore
  ```
* To ignore all files in a specific path

  ```
  $ echo 'directory' >> .gitignore
  $ echo '/directory/directory/*' >> .gitignore
  ```
