Quiz-summary
0 of 5 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
Information
GitHub is a platform built around Git that helps developers collaborate, review code, and manage software projects in a distributed environment. Mastering it requires more than knowing commands — real confidence comes from repeatedly solving practical scenarios and understanding how workflows behave in edge cases. Regular quiz practice helps identify gaps in concepts like branching, pull requests, and repository management. On Quizsm, carefully designed GitHub quizzes allow learners to test their understanding through tricky, real-world scenarios, making self-assessment clearer and more reliable.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 5 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- Answered
- Review
-
Question 1 of 5
1. Question
A team maintains a protected main branch. A developer rebases their feature branch locally and tries to push using:
git push --force origin feature-xMeanwhile, another developer has pushed new commits to feature-x on the remote.
What is the safest command to update the remote branch without accidentally overwriting the other developer’s commits?Correct
Incorrect
-
Question 2 of 5
2. Question
A developer accidentally runs:
git reset --hard HEAD~3Three commits disappear from the branch history. The commits were never pushed.
What is the most reliable way to recover them?
Correct
Incorrect
-
Question 3 of 5
3. Question
A developer runs:
git clone --depth 1 https://github.com/org/project.gitLater they try to view older commits using:
git logBut only one commit appears.
Which command converts this repository into a full clone with complete history?
Correct
Incorrect
-
Question 4 of 5
4. Question
A repository contains a Git submodule:
/libs/payment-sdkA developer clones the repository and builds the project, but compilation fails because the submodule directory is empty.
Which command correctly initializes and downloads the submodule code?
Correct
Incorrect
-
Question 5 of 5
5. Question
A GitHub Actions workflow attempts to push changes back to the repository using the default GITHUB_TOKEN, but the push fails with a permission denied error.
What is the most likely cause?Correct
Incorrect

