What is the difference between a fork, a clone and a branch?
A fork is your own server-side copy of someone else's GitHub repository. A clone is a local copy on your computer. A branch is a separate line of work inside one repository.
Explain it simply
Picture a famous cookbook. A fork is buying your own copy of the whole book and keeping it in your own shelf on GitHub, so you can scribble without permission. A clone is carrying that book home. A branch is a loose page inside one book where you try a new recipe.
You fork when you cannot write to the original project, then clone your fork, work on a branch, push, and open a pull request back to the original. Inside a team repo where you have write access, you usually just clone and branch.
Example
original/repo --fork--> you/repo --clone--> laptop
|
git switch -c feature (branch)What to say in the interview
"A fork is a GitHub-side copy owned by me, a clone is a local copy of a repository, and a branch is a line of development inside one repository. For open source I fork, clone my fork, branch, and open a pull request to the original."