Books
Learn HTML
Learn CSS
Learn Git
Learn Javascript
Learn PHP
Learn python
Learn Java
Exercises
HTML
JavaScript
Git
CSS
PHP
Courses
Quizzes
Snippets
Tools
General Tools
Password Generator
HTML Editor
HTML Encoder
Base 64
Code Diff
JSON Beautifier
CSS Beautifier
Markdown Convertor
Find the Closest Tailwind CSS Color
Phrase encrypt / decrypt
Browser Feature Detection
Number convertor
JTW Decoder
CSS Maker
CSS Maker
CSS Maker text shadow
CSS Maker Text Rotation
CSS Maker Out Line
CSS Maker RGB Shadow
CSS Maker Transform
CSS Maker Font Face
Color Tools
Color Picker
Colors CMYK
Colors HWB
Colors HSL
Color Hex
Color mixer
Color Converter
Colors RGB
Color Contrast Analyzer
Color Gradient
String Tools
String Length Calculator
MD5 Hash Generator
Sha256 Hash Generator
String Reverse
URL Encoder
URL Decoder
Base 64 Encoder
Base 64 Decoder
Extra Spaces Remover
String to Lowercase
String to Uppercase
Word Count Calculator
Empty Lines Remover
HTML Tags Remover
Binary to Hex
Hex to Binary
Rot13 Transform on a String
String to Binary
Duplicate Lines Remover
Change theme
Dark
Light
System
Books
Learn HTML
Learn CSS
Learn Git
Learn Javascript
Learn PHP
Learn python
Learn Java
How To
How To NodeJs
How To Linux
How To AngularJs
How To PHP
How To HTML
How To CSS
How To Symfony
How To Git
How To Apache
How To JavaScript
How To Java
How To Vue.js
How To Python
Git Basics
1/25
Which of the following must be present and configured on your local OS before Git installation?
Java Development Kit 1.8 or newer
Apache Maven
Jakarta Enterprise Edition web profile compliant server
Nothing
Next >
2/25
Which is not a Git configuration scope?
Local
System
User
Global
Directory
Next >
3/25
How can you create a branch and switch to it directly?
git checkout -b <branch-name>
git branch --switch <branch-name>
git branch --checkout <branch-name>
git checkout --create-branch <branch-name>
Next >
4/25
Which command is run to check the state of your local git repository since your last commit?
git check
git status
git commit
git diff
Next >
5/25
How should you save the current state of your code into Git?
By adding all changes and staging them with git add
By adding all changes and staging them with git stage
By committing the staged changes with git commit
By creating a new commit with git init
Next >
6/25
What is a shortcut to staging all the changes you have?
git commit add .
git add .
git commit .
git push -am "Message"
Next >
7/25
What is the correct commit syntax for all changes with a message?
git commit -a "Your commit message"
git commit -am "Your commit message"
git message -am "Your commit message"
git add -a "Your commit message"
Next >
8/25
Which option is used to stash your untracked files?
git stash -a
git stash -u
git stash -q
git stash -k
Next >
9/25
Which of the following is a valid Git merge strategy?
Fast-forward
Recursive
Direct-commit
Automatic
Merge-commit
Next >
10/25
What is 'git bisect' used for?
To find the commit that introduced a bug using binary search
To create a new commit
To list all branches
To merge two branches
To delete a branch
Next >
11/25
What does 'squashing' in Git mean?
Renaming branches
Deleting unwanted commits
Creating new branches
Cloning repositories
Combining several commits into a single commit
Next >
12/25
What is the purpose of the 'git branch -d' command?
To delete a branch
To rename a branch
To merge a branch
To list all branches
To create a new branch
Next >
13/25
What does 'git add -i' enable?
Ignores files for tracking
Initializes a new repository
Adds a remote repository
Archives repository files
Interactive staging mode
Next >
14/25
What is Git LFS (Large File Storage) used for?
For storing configuration files
For archiving the repository
For handling large files in a Git repository
For cloning large repositories
For merging large branches
Next >
15/25
What is a key difference between 'git merge' and 'git rebase'?
There is no difference
Merge preserves history, whereas rebase rewrites it
Merge is faster than rebase
Merge deletes history, whereas rebase preserves it
Merge is used for public branches, rebase for private
Next >
16/25
In which scenario is 'git bisect' particularly useful?
To show a list of recent commits
To revert a commit
To quickly find the commit that introduced a bug
To merge feature branches
To clone a repository
Next >
17/25
What is a 'tracking branch' in Git?
A branch that contains all the commits
A branch that automatically merges changes
A local branch that is always up to date
A branch used for staging changes
A branch that tracks changes from a remote branch
Next >
18/25
What does 'git reset --hard' do?
Creates a backup of the current state
Merges the current branch with the master branch
Resets the working directory and index to the last commit, discarding all changes
Resets only the index but not the working directory
Resets only the working directory but not the index
Next >
19/25
What is a best practice for collaborating with others in Git?
Avoid using tags for versioning
Commit changes directly to the master branch
Use a single branch for all developments
Never merge branches
Regularly pull changes from the remote repository to stay updated
Next >
20/25
What is a common cause of merge conflicts in Git?
Merging without pulling latest changes
Failure to commit before merging
Using different Git versions
Incorrect use of Git commands
Concurrent modifications in the same lines of a file in different branches
Next >
21/25
When is it recommended to use 'git stash'?
Before every commit
After every merge
To delete all changes in the working directory
When you need to switch branches and have uncommitted work that is not ready to commit
To create a new branch
Next >
22/25
What additional information can 'git blame' show besides authorship?
The commit each line of a file was last modified in
The entire commit history of the file
The size of each change in the file
The number of times the file was modified
Future planned modifications
Next >
23/25
How can you protect branches in Git?
By setting branch protection rules in the repository settings
Through .gitignore files
Using the 'git protect' command
Branches cannot be protected in Git
By making branches read-only
Next >
24/25
Why would you create aliases for Git commands?
To rename existing Git commands
To create new Git commands
For shortcut commands to save time on frequently used operations
To track changes in Git commands
For securing Git commands
Next >
25/25
What is a 'detached HEAD' state in Git?
When the HEAD is missing from the repository
When HEAD points directly to a commit rather than a branch
A broken state that needs immediate fixing
A state where HEAD points to multiple branches
A special mode for merging
Next >
To get the result of the quiz, please provide your email address (optional)..
Get Certificate
It seems you haven't answered any questions yet. Please provide your answers to proceed.