DEV Community

Discussion on: I Created 500+ Dev questions and Launched a Quiz platform 🏆🎉

Collapse
 
rafaacioly profile image
Rafael Acioly • Edited

Hi Madza, this project is super nice, congratulations.

I've taken the git quizz and found a little mistake, there is this question:

Which of the following commands is used in
switching between branches?

- git switch
- git checkout
- git branch
- git change
Enter fullscreen mode Exit fullscreen mode

The correct answer can be git switch or git checkout depending on the git version.

git checkout was introduced on version 2.4

git-scm.com/docs/git-checkout
git-checkout - Switch branches or restore working tree files

git switch was introduced on version 2.27.x

git-scm.com/docs/git-switch
git-switch - Switch branches

git switch was added to make the commands more precise, (git checkout had too many responsibilities), now instead of using git checkout to switch branchs or restore tree files we have two new commands:
git switch and git restore

Collapse
 
madza profile image
Madza • Edited

Thanks for the contribution! I've edited the question and included you in the Top contributors list 👍🏆
Also you can submit edits directly from the platform... As soon as each question is answered there is an Edit option on the left. 😉