I have a directory structured like this:

```
main_folder
 .git
 .gitignore
 rootfolder
  .DS_Store
  folder1
   .ipynb_checkpoints/filename-checkpoint.csv
   abc.txt
   def.json
   somedir
    more.json
  folder2
   .DS_Store
   .ipynb_checkpoints/file-filename2-checkpoint.csv
   rty.csv
   somedir
    uis.py
    .ipynb_checkpoints/filename1-checkpoint.csv
    .DS_Store

```

Being in the main\_folder, I would like to commit everything, except all folders and files having the `DS_Store` or `ipynb_checkpoints` substring.

In this specific case, I would like to commit:

```
main_folder
 rootfolder
  folder1
   abc.txt
   def.json
   somedir
    more.json
  folder2
   rty.csv
   somedir
    uis.py

```

In `.gitignore`-file, I have added:

```
**/checkpoint.csv
**/.DS_Store

```

But not all checkpoint files have being ignored.
What command lines should I add into my `.gitignore` file located in `main_folder`-directory