From the course: Git for Teams

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Best practices: gitignore

Best practices: gitignore - Git Tutorial

From the course: Git for Teams

Start my 1-month free trial

Best practices: gitignore

- [Instructor] Using a Git ignore file is another best practice for your team. It prevents unnecessary files from entering your repository such as those specific to your IDE that are used for configuring workspaces. Let's run a quick demonstration that builds a Git ignore file. To perform this demonstration we'll work on an example Java project that's been built with Eclipse. You'll find this project in your course materials. The name of the project is Git-Ignore-Demo. If we take a look within the project, you'll see that we have several files and directories that are specific to the Eclipse workspace. For example, the class path and the project and the settings directories and files are all used by Eclipse. The bin directories just going to contain our compiled classes. Those things don't need to go into our repositories. Let's go ahead and build a Git ignore file to keep them out. Most often Git ignore files are placed within the root of the repository. So I'm just going to use them…

Contents