Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Git Interview Questions and Answer Part – 8

What are the fundamental concepts in Git’s object model?

  • Commits, trees and leaves
  • Commits, files and branches
  • Commits, tags and branches
  • Commits, snapshots, and references (Ans)

What are the characteristics of a well-formed commit message?

  • It should consist of a short one-sentence summary followed by an optional longer description. (Ans)
  • It should have a total maximum length of 50 characters.
  • It should be short and concise.
  • It should have lines that are no longer than 72 characters.

What is the merge-base between two commits?

  • The list of all common parents of the two commits
  • The first common parent of the two commits (Ans)
  • The oldest common parent of the two commits
  • A special reference pointing to the commit that is being merged into the other one

How do you make sure that each commit represents a single set of changes?

  • You use the index to select which changes are going to be part of the commit. (Ans)
  • You make sure that all the changes in our working directory are relate-
  • You always work on one kind of change at a time.
  • You use branches to isolate different kinds of changes.

Why is the reflog important when rewriting history?

  • Because it allows you to see a list of references currently in the repository
  • Because it allows you to amend existing commits
  • Because it allows you to see a log of the commits currently in the repository
  • Because it allows you to restore history to a previous state (Ans)

TFS Pull Request Notifications can only be configured at the team level.

  • True
  • False (Ans)

How do you get commits to a remote repository such as GitHub?

  • Checkin
  • Push (Ans)
  • Commit
  • Upload

How many options do you have for source control in TFS 2013?

  • 2 (Ans)
  • 3
  • 4
  • 1

You can include external Git repositories in an automated TFS Buil-

  • false
  • true (Ans)

When do Reference CodeLens Indicators get updated on a Method definition?

  • When you commit your changes locally
  • As soon as you add code that references that method (Ans)
  • When you compile your code
  • When you push your changes to the server

What information can you see on the Pull Request details screen in TFS?

  • Code Changes
  • Source branch
  • File listing
  • Target branch
  • Discussion
  • All of these (Ans)
  • Reviewers

What version control approaches are used by Centralized Version Control systems?

  • All of the Above (Ans)
  • Edit/Commit
  • None of the Above
  • Check-in/Check-out

Pushing your local repository to a central Git repository includes all your commits.

  • true (Ans)
  • false

To access a file’s history in Git, you must access a central repository.

  • False (Ans)
  • True

If you create a new method, when does the CodeLens History indicator reflect that you are the author?

  • When you compile your code
  • When you push your changes to the server
  • As soon as the method is created
  • When you commit your changes locally (Ans)

If your co-worker changes a method and pushes the change to the server, when does CodeLens tell you about the change?

  • When you push your changes to the server
  • When she commits her changes locally
  • When you pull her changes from the server (Ans)
  • As soon she pushes her changes to the server

What should you use to work with a local Git Repository and a centralized TFS source control repository?

  • Git Source Control Provider
  • Git-TF (Ans)
  • Visual Studio Git Extensions

To create a Git branch, you must first create it in a shared repository and then copy that branch to your local repository.

  • False (Ans)
  • True

What version control approaches are used by Centralized Version Control systems?

  • Check-in/Check-out
  • None of the Above
  • Edit/Commit
  • All of the Above (Ans)

If a Pull Request is rejected, can you make code changes and submit a revision?

  • Yes (Ans)
  • No

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.