WorksheetsGit and GitHub Essentials : Researchers' Club
Total questions: 11
Worksheet time: 20mins
Name and Roll Number
Which command is used to create a new local Git repository?
git start
git init
git create
git new
Which statement best explains the difference between Git and GitHub?
Git is a distributed version control system; GitHub is an online hosting service for Git repositories.
Git is an online hosting service; GitHub is a command-line tool for Git.
Git is a remote storage system; GitHub is used for local commits.
Git and GitHub are the same thing.
Which command stages changes for commit?
git push
git commit
git add
git merge
git clone is used to:
Copy a repository from GitHub to your local computer.
Duplicate a branch in your local repo.
Push files to a remote repo.
Make a backup without commit history.
Which command shows the list of commits in the current branch?
git log
git history
git list
git commit --list
Which command uploads your local commits to a remote repository?
git push
git pull
git send
git upload
git pull is used to:
Fetch changes from a remote repo and merge them into your local branch.
Upload local commits to the remote branch.
Create a copy of the repository.
Undo the last commit.
Which of the following steps is NOT part of contributing to an open-source project?
Forking the repository.
Cloning your fork locally.
Creating changes and committing them.
Pushing directly to the original owner’s repository without permission.
What’s the correct first-time push sequence for a new GitHub repository?
git init → git add → git commit → git push
git init → git add → git commit → git remote add origin → git push
git remote add origin → git init → git add → git commit → git push
git commit → git push → git add
What is the default branch name for new GitHub repositories created after October 2020?
main
master
origin
default
