Exercises
Assess your understanding of essential Git version control concepts with this Git Basics Knowledge Assessment. Test your knowledge of initializing and cloning repositories, checking repository status, staging and committing changes, using .gitignore, reviewing commit history, creating and switching branches, and temporarily saving work with Git stash. This quiz is ideal for beginners learning Git commands and core workflows, as well as developers who want a quick refresher on everyday repository management.
Answer the questions below and check the explanation for each answer.
0/11 answered
Auto audio on: the next questions will be read aloud when you click Continue.
Git is a distributed version control system. It helps in tracking changes in source code during software development.
The git init command is used to create a new, empty Git repository or to reinitialize an existing one.
Use the git status command to display the state of the working directory and the staging area.
The git clone command is used to create a copy of an existing repository on your local machine.
The git add command adds file changes in the working directory to the staging area (index).
A .gitignore file specifies `files` that Git should intentionally omit. This avoids tracking changes to files that were not meant to be committed.
The git commit -m 'message' command is used to commit staged changes with a message describing the changes.
The git log command shows the commit history for the specified branch.
To create a new branch, use the git branch [branch-name] command.
The git checkout [branch-name] command is used to switch branches in your working directory.
The git stash command temporarily saves all the changes you have made so that you can work on them later.

Free CourseGit and GitHub
4h02m
5 exercises

Free CourseDocker Containers and Kubernetes Fundamentals
5h56m
6 exercises

Free CourseJenkins
3h53m
20 exercises

Free CourseUse ChatGPT for DevOps tasks
1h07m
6 exercises

Free CourseKubernetes for Beginners
3h36m
6 exercises

Free CourseGit and Git Hub
2h00m
54 exercises

Free CourseGoogle Chrome dev tools
51m

Free CourseEthical hacking for beginners
21h06m
13 exercises
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks