In a code review, what should be the primary focus when evaluating a pull request?
- Syntax and coding style, Functional correctness, Performance optimization, Documentation
- Ignore syntax errors, Focus only on coding style, Prioritize performance over functionality, Neglect documentation
- Ignore functional correctness, Ignore performance issues, Focus only on documentation, Prioritize syntax over coding style
- Prioritize documentation over functionality, Focus only on syntax, Ignore performance and coding style, Neglect functional correctness
The primary focus in a code review should be on functional correctness. Ensuring that the code behaves as intended is crucial. While other aspects like coding style, performance, and documentation are important, they are secondary to the core functionality of the code.
In terms of secure Git practices, what is the significance of signed commits?
- It speeds up commit operations
- It encrypts the commit messages
- It ensures the integrity and authenticity of commits
- It restricts commit access
Signed commits ensure the integrity and authenticity of commits by associating them with a GPG key. This helps verify that the commits come from a trusted source and haven't been tampered with.
How does splitting a large repository into smaller ones affect Git performance?
- Improved performance
- No impact on performance
- Reduced performance
- Performance varies based on file types
Splitting a large repository into smaller ones can improve Git performance. Smaller repositories result in faster cloning, fetching, and overall better performance, as Git operations are more streamlined with reduced data to handle.
A company is transitioning from SVN to Git. They want to ensure their historical branches and tags are preserved. What migration strategy should they use?
- Fast-Forward Merge
- Rebase
- Submodule
- git-svn
The git-svn option allows for a smooth transition from SVN to Git, preserving historical branches and tags. It maintains compatibility during migration.
A team is transitioning a large legacy codebase to Git. They encounter issues with large binary files. What Git feature should they consider using?
- Git LFS
- Git submodules
- Git cherry-pick
- Git rebase
Large binary files can be efficiently managed using Git LFS (Large File Storage). Git LFS is an extension that replaces large files in a repository with tiny pointer files while storing the actual file contents on a separate server. This helps in handling binary files more effectively.