In migrating a large codebase to Git, what factors influence the choice of using a monorepo versus multiple smaller repositories?

  • Easier management of dependencies in a monorepo compared to smaller repositories.
  • Facilitates better code isolation and release management in smaller repositories.
  • Monorepo is always preferred for large codebases, irrespective of other factors.
  • Multiple smaller repositories lead to improved build and deployment processes.
Choosing Between Monorepo and Multiple Repositories in Git

When merging branches, which Git command is used to create a new commit that represents the combined changes?

  • git push
  • git commit
  • git merge
  • git branch
The correct command for merging branches and creating a new commit is git merge. This command combines the changes from different branches into the current branch, resulting in a new commit that represents the merged state.

A team working on a project hosted on GitHub wants to ensure code style consistency. Which feature should they implement?

  • Git Hooks
  • Git Submodules
  • Git LFS
  • Git Tags
To ensure code style consistency in a project hosted on GitHub, the team should implement Git Hooks. Git Hooks allow developers to run custom scripts before or after certain Git events, enabling them to enforce coding standards and other practices.

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.