Software Engineering Intern Interview Question

How do you use Git on a team project, and how do you resolve a merge conflict?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Work on a short lived branch for each feature or fix, commit small logical changes with clear messages, pull the latest main branch often, and open a pull request so someone reviews your work before it merges. A merge conflict happens when two branches change the same lines. Resolve it by understanding both changes, combining them correctly in the conflicting files, removing the conflict markers, running the tests, then committing.

Why interviewers ask this

Version control is a day one skill for any internship, and many students have only used Git on their own. The interviewer wants to know you can work safely with others: branches, small commits, pull requests and staying up to date. Resolving conflicts calmly, by understanding both changes rather than just picking one side, and testing afterwards, shows you will not accidentally delete a teammate's work.

How to structure your answer

  • Describe your branching and commit habits.
  • Explain pull requests and keeping up to date with main.
  • Explain what causes a merge conflict.
  • Walk through how you resolve one safely.

Example answer

Spoken example, first person

On team projects I create a branch for each feature or fix, so main always stays working. I commit in small, logical steps with messages that say why the change was made, because a commit called fix stuff is useless a week later. I pull the latest main into my branch regularly, so I find conflicts early while they are small, and when I am done I open a pull request so a teammate can review it before it merges. A merge conflict happens when two branches change the same lines, or one deletes a file the other edited, and Git cannot decide which version is right. When I hit one, I open the files Git lists and look at the conflict markers, which show my version and theirs. The important thing is to understand what both changes were trying to do, rather than just keeping mine. In a group project, a teammate and I had both edited the same login function, me adding validation and him improving error messages, so the right answer combined the two. Then I remove the markers, run the tests and commit the merge.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • What is the difference between merge and rebase?
  • How would you undo a commit you have already pushed?
  • What makes a good commit message?

Related software engineering intern questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot