What is the purpose of a .gitignore file in a Git repository?
- Specifies files and directories that should be ignored by Git.
- Lists all files in the repository.
- Tracks changes in the repository.
- Adds new files to the repository.
The .gitignore file is used to specify intentionally untracked files that Git should ignore. This is useful for excluding files generated by the build process or system files that should not be committed. It helps in maintaining a clean repository by avoiding the accidental addition of irrelevant files.
Loading...
Related Quiz
- In the Gitflow workflow, the ________ branch contains the official release history.
- What is the first step you should take when encountering a merge conflict in Git?
- After a major failure in version control, an enterprise revises its Git strategy. What aspect of Git are they most likely to focus on for improvement?
- Discuss the advantages of integrating Git with cloud-based IDEs in a CI/CD pipeline.
- Cloud platforms like GitHub provide _________ to facilitate tracking issues and tasks related to the codebase.