Gitignore

From time to time, there are files you do not want Git to check into GitHub or other repositories. The easiest way to do this is to create .gitignore in the repository folder; Git will use it to determine which files a directory should ignore before you make a commit. This file should be committed into the repository to share the ignore rules with other users. 

This file can include language-specific files, for example, let's exclude the Python Byte-compiled files:

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

We can also include files that are specific to your operating system: 

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

You can learn more about .gitignore on GitHub's help page: https://help.github.com/articles/ignoring-files/. Here are some other references: 

I see the .gitignore file as a file that should be created at the same time as any new repository. That is why this concept is introduced as early as possible. We will take a look at some of the Git usage examples in the next section. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset