What is the purpose of the .gitignore file in a Git repository?
- Exclude specific files from version control
- Store sensitive data
- Track changes in the repository
- Create backups automatically
The .gitignore file is used to exclude specific files or patterns from being tracked by Git. This is helpful to avoid cluttering the repository with files that shouldn't be versioned, such as temporary files, build artifacts, or system-specific files.
Loading...
Related Quiz
- What advanced strategies can be used for optimizing Git operations in a continuous integration/continuous deployment (CI/CD) environment?
- A pull request is a request to merge a branch called _______ into another branch in a Git repository.
- In complex projects, maintaining a clean history can involve the use of git rebase -i, which stands for interactive ________.
- How does the git reflog command assist in recovering lost commits?
- A team wants to automatically test and deploy features as soon as they are pushed to a specific Git branch. Which CI/CD practice aligns with this?