Home / GitHub Fundamentals: Collaboration, Pull Requests and Actions / Interview questions · हिन्दी
GitHub interview questions
14 questions from the GitHub Fundamentals: Collaboration, Pull Requests and Actions course, each with the correct answer and an explanation. Try to answer before you open the answer.
Module 2: Basic Collaboration 1. Which command downloads a full copy of a remote repository, including its history? git remote add origin git push git clone git fetch only Show answer Answer: git clone
`git clone` copies the entire repository, while `git remote add` only links an existing local repo to a URL.
Lesson: Pushing & Cloning
Module 3: Pull Requests 2. What does submitting a review as "Request changes" do? Immediately merges the PR Deletes the pull request Approves the PR Blocks merging until addressed and re-reviewed Show answer Answer: Blocks merging until addressed and re-reviewed
It flags the PR as needing changes and blocks merging if required reviews are enforced.
Lesson: Reviewing a Pull Request
Module 4: Issues 3. Which closing keyword in a PR description automatically closes issue #42 when the PR merges? Fixes #42 See #42 About #42 Mentions #42 Show answer Answer: Fixes #42
GitHub recognizes keywords like Fixes, Closes and Resolves before an issue reference and auto-closes it on merge.
Lesson: Issues for Project Tracking
Module 6: Branch Protection 4. What does Dependabot do? Opens pull requests to update vulnerable or outdated dependencies Deletes old branches Hosts your site Runs your tests only Show answer Answer: Opens pull requests to update vulnerable or outdated dependencies
It automates dependency updates and security fixes.
Lesson: Security: 2FA, Dependabot & Secret Scanning
Module 7: GitHub Actions 5. Where must GitHub Actions workflow YAML files live in a repository? actions/ .github/workflows/ ci/ .git/hooks/ Show answer Answer: .github/workflows/
GitHub only discovers workflow files inside the .github/workflows/ directory.
Lesson: A Minimal Workflow
Module 9: Team Features 6. Which organization permission level lets someone push code but not change repo settings? Read Admin Write Owner only Show answer Answer: Write
Write allows pushing and managing issues/PRs, while changing repo settings requires Admin.
Lesson: Organizations & Teams
7. How are Git and GitHub related? They are the same program Git runs only on GitHub GitHub hosts Git repositories and adds collaboration features GitHub replaces Git Show answer Answer: GitHub hosts Git repositories and adds collaboration features
Git is the version-control tool; GitHub is the hosting platform.
Lesson: Organizations & Teams
8. Which command copies a remote repository with its full history? git remote add git commit git stash git clone Show answer Answer: git clone
clone also sets up origin.
Lesson: Organizations & Teams
9. What is a pull request? A request to review and merge changes A download command A backup A branch deletion Show answer Answer: A request to review and merge changes
It proposes merging one branch into another.
Lesson: Organizations & Teams
10. Which keyword closes issue #42 on merge? See #42 Fixes #42 About #42 Ref #42 Show answer Answer: Fixes #42
Closing keywords auto-close linked issues.
Lesson: Organizations & Teams
11. Which merge strategy combines all branch commits into one? Merge commit Rebase Squash Cherry-pick Show answer Answer: Squash
Squash keeps main's history compact.
Lesson: Organizations & Teams
12. Where do GitHub Actions workflow files live? actions/ ci/ .git/ .github/workflows/ Show answer Answer: .github/workflows/
GitHub detects YAML files in that folder.
Lesson: Organizations & Teams
13. What do branch protection rules do? Require reviews and passing checks before merge Hide the branch Delete old commits Speed up CI Show answer Answer: Require reviews and passing checks before merge
They stop direct pushes and force-pushes to protected branches.
Lesson: Organizations & Teams
14. Which permission should most contributors get? Admin Write (least privilege needed) Owner None Show answer Answer: Write (least privilege needed)
Grant the minimum level required.
Lesson: Organizations & Teams
← Back to the course