Understanding Git Basics
What is the main purpose of using Git in software development projects?
- A tool for version control so you can track changes and collaborate with others
- A program to write and execute code directly
- A database management utility for storing records
- A system for designing website layouts visually
- A tool for converting code to different programming languages
Version Control Systems
Which statement best describes a Version Control System (VCS)?
- It helps manage and track changes to files and projects over time
- It only allows one developer to edit code at a time
- It is used to increase the speed of internet connections
- It translates programming languages automatically
- It is a backup tool for personal photos only
Initializing Repositories
If you want to start tracking a new project with Git, which command would you use in your project folder?
- git init
- git start
- git upload
- git begin
- git commit
Cloning a Repository
What happens when you run 'git clone u003Crepository-urlu003E' on your computer?
- You create a complete local copy of the repository, including its history and branches
- You permanently delete the remote repository
- You merge all remote branches into your current branch
- You upload your current local files to the remote repository
- You initialize a brand new repository with no files
Staging Changes
After modifying a file, which Git command would you use to move your changes to the staging area before committing?
- git add
- git plus
- git stageall
- git upload
- git join
Committing Changes
What does the 'git commit' command do when used after staging changes?
- It saves the staged changes to the repository with a message describing them
- It initializes a new repository
- It clones a remote repository
- It discards all changes made since the last commit
- It displays the commit history
Viewing Status
If you want to see which files have been modified, staged, or are untracked, which command should you use?
- git status
- git show
- git check
- git push
- git pull
Checking Commit History
How can you view a list of previous commits, including messages and author details in Git?
- git log
- git commit -m
- git status
- git track
- git browse
Configuring Git Settings
Which Git command is used to set configuration options like your username and email address?
- git config
- git setupuser
- git edit
- git userconfig
- git profile
Branches in Git
What does the command 'git branch' show you when used by itself?
- A list of all branches in the repository, highlighting the current branch
- The contents of all files in your repository
- A list of users with access to the repository
- All recent commit messages
- A summary of merge conflicts