Most of the time, one would not want to transfer all the folders and files in your local project onto GitHub. For example, if you are working on a data science project and the datasets you are working with are significantly large, it is undesirable to upload these datasets on GitHub. In fact, there is a limit of 100 MB in size for files that you can upload to GitHub. Another reason not to upload everything to GitHub is to avoid leakage of sensitive information such as login credentials and API keys that are stored in your projects.
To leave certain files out of the transferring process, you can take advantage of a .gitignore file. Treated as a hidden file, only to be interpreted by Git, .gitignore can be edited as a text file in which folders and files that should be ignored by Git can be listed out.
With that, we have learned about the fundamental components of a Git/GitHub workflow. In the next section, we will see how PyCharm can streamline and automate most of this process.