Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online Git Test

Topics Covered

  • Git commands - remote
  • log
  • init
  • Config
  • commit
  • merge
  • Git prune
  • branch
  • hashes

Useful for hiring

  • Full Stack Developer
  • API Engineer
  • Backend Developer
  • Software Developer
  • Git Developer
  • Linux Kernel Developer  

Start hiring job-fit candidates using this assessment

GET A DEMO

"We realized that to acquire quality talent, our recruitment process was in dire need of automation. Too many of our technicalteam were simply wasting hours conducting interviews that did not yield the desired results. For us the foremost criteria were to finda recruitment partner who could tick all the right boxes"

Rehana Nisar, Gartner,
Global Product & Services Recruitment Head
Question

You repo is growing in size. One of the main reasons for this is that guys have not been deleting branches after merging to the desired branch. Choose the correct commands to use to delete all remote branches that have already been merged.

Note: There can be multiple correct answers to this question.

Answer
    • git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
       

    • git branch -d branchname
       

    • git branch -r --merged | grep -v master | sed 's/origin\//:/' | xargs -n 1 git push origin
       

    • git branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin
       

Question

Alice is supposed to purge all the commits that are not referenced in her git root directory. Which of the following commands is suitable for doing that?

Answer
    • git fetch --all && git remote prune
       

    • git fetch –prune
       

    • git prune
       

    • git prune -n –dry-run
       

Question

You are writing a script that accepts commit reference. Since the most direct way to reference a commit is via its SHA-1 hash, you should use a command that will only output the commit’s hash. Which of the following is the best command to use?

Answer
    • git log
       

    • git show
       

    • git rev-parse
       

    • git diff
       

Test details:

Git skills test will evaluate the candidate's practical knowledge and will identify whether the candidate is ready to be employed. Git skills assessment test can be taken by candidate from anywhere in the comfort of their time zone.

Git pre-employment test may contain MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, Whiteboard Questions, Audio / Video Questions, True or False.


Test Duration: 20 minutes

10 Application Questions

Test description:

Git is a free, open source distributed version control system tool designed to handle everything from small to very large projects with speed and efficiency. Git is also a source code management system with an emphasis on speed. Git software is used by the developers to carry out the tasks of their projects effectively using Git commands and functions.
 
Online Git test helps hiring managers & recruiters to find the best suitable candidate by assessing his/her ability to work on different Git commands and functions. Git online test questions are designed & validated by subject matter experts (SMEs) to assess & hire software developers as per the industry standards.
 
Git skills assessment test helps to screen the candidates who possess traits as follows:
 
1.  Strong experience of working on version control software of Git
2.  Excellent knowledge of Git commands and usage
3.  Ability to handle the Git cheat sheet
4.  Excellent knowledge of Git collaboration model with its repository functions, branch structures and workflows
 
Interview Mocha’s powerful reporting & intelligent analytics will help you overview candidate’s performance in each section within a glance. Candidate feedback module will ensure candidates are having excellent experience with Interview Mocha.

Git online test is designed with consideration of EEOC guidelines for candidate assessment. It will help recruiters to assess and hire diverse talent without any bias.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO