DevOps & Cloud 路 Intern to senior

Git Interview Questions and Answers

Every engineering role uses Git, so almost every interview loop includes a few questions about it. Interviewers want to know you can work on a shared branch without losing work, explain what a command does to history, and recover when something goes wrong.

Download Git PDF5 questions

3 of 5 questions match

Clear filters
  • GitMedium

    What is the difference between git merge and git rebase?

    Both integrate changes from one branch into another: merge keeps both histories and joins them with a merge commit, while rebase rewrites your commits so they appear on top of the target branch, giving a linear history.

    Junior 路 Mid-level 路 Git
  • GitMedium

    How do you resolve a merge conflict in Git?

    Open the conflicted files, decide what the final code should be between the conflict markers, remove the markers, run the tests, then stage the files and continue the merge or rebase.

    Junior 路 Mid-level 路 Git
  • GitMedium

    What is the difference between git reset and git revert?

    git revert creates a new commit that undoes an earlier one and is safe on shared branches; git reset moves the branch pointer back to an earlier commit, effectively removing later commits from that branch鈥檚 history.

    Mid-level 路 Senior 路 Git