WorksheetsGit Pre-Assessment Quiz (Basic Level)
Total questions: 10
Worksheet time: 5mins
What is Git primarily used for?
Editing images
Managing source code versions
Running servers
Building mobile apps
Which command initializes a new Git repository in the current directory?
git start
git begin
git init
git create
Which command shows the current state of the working directory and staging area, including tracked and untracked files?
git log
git diff
git status
git show
Which command is used to record staged changes as a new snapshot in the repository history?
git save
git commit
git push
git add
What is the primary purpose of the git clone command?
Create a new branch
Copy a remote repository to your local machine
Delete a repository
Upload local changes to GitHub
Which command stages file changes so they will be included in the next commit?
git add
git commit
git merge
git branch
What does git push do in a typical workflow with a configured remote?
Saves changes only on the local machine
Sends committed changes to a remote repository
Creates a brand-new repository on disk
Deletes branches that were merged
Which command retrieves new commits from a remote repository without merging them into the current branch?
git fetch
git pull
git update
git merge
What is the purpose of a .gitignore file in a repository?
To track ignored files explicitly
To list files Git should not track
To delete unnecessary files during cleanup
To list all commits in the project
You need to create an independent line of development for a new feature. Which command creates the branch without switching to it?
git checkout -b featureX
git branch featureX
git switch featureX
git clone featureX
