GIT

Check your understanding: Git basics quiz

Interactive tasks for beginners who have seen git add, git commit and git push. Drag to order, answer multiple-choice, then check your score.

Task 1 — Put these commands in the correct order

Steps for creating a new file and publishing it to a remote repository

  1. 1Run git commit -m "Add file"
  2. 2Run git add <file>
  3. 3Run git push origin main
  4. 4Create or modify the file in your working directory

Hints & Explanation

The correct sequence in Git is:
Make changes → stage changes → commit → push. Use the "Check order" button for feedback and an explanation of each step.

Task 2 — Multiple choice (pick the best answer)

Select one answer per question. Click "Grade" when done.

1) What does git add do?

2) What does git commit create?

3) What does git push do?

4) Which command shows the current branch and staged/un-staged changes?

5) You want to incorporate changes from a feature branch into main. Which basic command merges the feature branch into main?

6) Which sequence best describes a typical local → remote cycle?