What is Git primarily used for?
Answer: c) Version control
Which command is used to initialize a new Git repository?
git initgit startgit creategit newgit initWhich command is used to check the status of your files in the working directory and staging area?
git checkgit statusgit diffgit loggit statusHow do you stage changes for the next commit?
git add .git commit -m "message"git pushgit stagegit add .Which command is used to commit changes to the local repository?
git commit -m "message"git pushgit addgit statusgit commit -m "message"How do you clone a repository from GitHub?
git clone [repository_url]git fork [repository_url]git copy [repository_url]git download [repository_url]git clone [repository_url]Which command is used to create a new branch in Git?
git new branch [branch_name]git create branch [branch_name]git branch [branch_name]git checkout -b [branch_name]git branch [branch_name]How do you switch to another branch in Git?
git switch [branch_name]git branch [branch_name]git checkout [branch_name]git change [branch_name]git checkout [branch_name]How do you view the commit history in Git?
git historygit loggit commitsgit showgit logWhat is GitHub Desktop used for?
Answer: a) Version control using a graphical interface
How do you discard changes in your working directory?
git discardgit removegit reset --hardgit cleangit reset --hardWhich command is used to delete a branch in Git?
git remove branch [branch_name]git delete branch [branch_name]git branch -d [branch_name]git branch --delete [branch_name]git branch -d [branch_name]What is a 'commit' in Git?
Answer: b) A snapshot of the repository at a specific point in time
What is the purpose of the .gitignore file?
Answer: b) To ignore specified files and directories from being tracked by Git
What is a 'remote' in Git?
Answer: b) A repository stored on another machine
Which command is used to display differences between commits, commit and working tree, etc.?
What is the purpose of the git config command?
Which command is used to undo the last commit while keeping the changes in the working directory?
Which command is used to list all branches in the repository?
Which command is used to view a specific commit in Git?