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
- How does the Forking workflow model differ from the Feature Branch workflow?
- How can Git help in tracking and reverting database changes?
- Which command in Git allows you to view the commit history?
- During a code review, a team member notices that a commit contains a bug. What Git feature can they use to identify who made the specific changes?
- Your team is reviewing a complex set of changes. How can you use Git to navigate through each change individually to discuss them?