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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Fundamentals of Git collaboration overview1m 43s
-
Common pitfalls: Untracked pulls4m 27s
-
Common pitfalls: Force push3m 16s
-
Best practices: Committing and syncing3m 29s
-
Best practices: gitignore4m 20s
-
Standardize line endings with autocrlf5m 20s
-
Branch naming1m 46s
-
Write descriptive commit messages6m 29s
-
Team composition and members roles5m 33s
-
-
-
-
-