Git Topics (4)Tap to switch
    Git·Version Control·Topic 4 of 4

    Git Remote Collaboration & Workflows Interview Questions

    Interview questions about team collaboration in Git, the difference between Fetch and Pull, the dangers of Force Push and force-with-lease, and branch protection rules.

    3 Questions1 Beginner1 Intermediate1 Advanced
    Q #1Intermediate
    #git-force-vs-force-with-lease

    Why is git push --force-with-lease the only safe alternative to git push --force after history rewrite?

    Think through your answer before revealing
    Q #2Advanced
    #git-safe-recover-accidental-force-push

    A teammate accidentally force-pushes a shared branch and hides other commits. How do you recover safely?

    Think through your answer before revealing
    Q #3Beginner
    #git-fetch-vs-pull-ff-only

    What is the difference between git fetch and git pull, and why is it recommended to set pull.ff only in Git settings?

    Think through your answer before revealing
    Offline · Reading cached copy