How can you protect sensitive data from being committed in Git?
- Use environment variables
- Encrypt the entire repository
- Add sensitive files to the .gitignore
- Use the git secure command
To protect sensitive data from being committed, you should add the sensitive files or patterns to the .gitignore file. This ensures that Git ignores these files, preventing them from being included in the version control system and shared with others.
Loading...
Related Quiz
- A large enterprise is migrating to Git. They are concerned about preserving their extensive development history. Which Git feature should they focus on?
- In a situation where multiple teams are working on different features simultaneously, how should merge conflicts be addressed to maintain a stable main branch?
- A git _______ is used to combine multiple commits into a single commit for a cleaner history.
- When a merge conflict occurs, which section of the conflict markers indicates the changes from the current branch?
- The ________ branch in Gitflow is used for integrating features before a release.