Ignoring Files

To ignore a specific file when committing, you have to do some steps:

  • To "hide" a file, it is necessary to create a specific file type.
$ touch .gitignore

Note: This file works like a folder, so the files you don't want to commit, just put them in this file.

PROBLEM SITUATION:

  • When we create a folder in the macOS operating system, an invisible .DS_Store the file is created. And as it is not part of our project, you could put the .DS_Store in the .gitignore file, otherwise, every time you would commit with him.

Notes:

  • The touch command is used to create, for example, touch file.txt, it will create a file of type .txt.
  • There is a website that generates gitignore like all the suggested files: Site . Github itself also designs this file, soon we'll talk about github.

 

results matching ""

    No results matching ""