Git & GitHub Course
Git & GitHub
/
Intermediate

Intermediate Interview Questions

Definition

Questions designed to test a candidate's experience working in team environments, handling conflicts, and managing branches.

Explain Like I'm New

Interviewers are looking for evidence that you've worked with other people. If you don't know what a Merge Conflict is, it means you've probably only ever coded alone.

Real World Example

Explaining exactly how you would resolve a merge conflict in VS Code.

Common Use Cases

  • •Mid-level Developer Interviews

Terminal Output

bash / terminal
/* Q: How do you resolve a Merge Conflict? A: 1. Git pauses the merge and modifies the conflicting files with markers (<<<<<<<, =======, >>>>>>>). 2. I open the files and manually delete the markers, deciding which lines of code to keep. 3. I run `git add` to stage the fixed files. 4. I run `git commit` to finalize the merge. */

Interview Questions

basic

  • What does `git clone` do?

intermediate

  • What is the difference between `git merge` and `git rebase`?

Flash Cards

Question

What does clone do?

Click to reveal answer
Answer

It downloads a remote repository to your local machine, including all files, branches, and the entire commit history.

Question

Merge vs Rebase?

Click to reveal answer
Answer

`git merge` combines two branches by creating a new 'Merge Commit', keeping the branching history visible. `git rebase` moves your entire feature branch to the tip of the main branch, rewriting history to create a perfectly straight, linear timeline without merge commits.