▶ ExamTry
Home
Medical
Neet Ug
4
Ssc-Cgl
General_Awareness
5
Mock-Test
5
Devops
Git
3
Ansible
10
Aws
5
Azure
10
Docker
5
Jenkins
5
Kubernetes
5
Terraform
10
⚑ Feedback
Home
Git
Exam1
Exam1
devops / Git
• 20 questions
Question 1 of 20
Which command is used to initialize a new Git repository?
A.
git start
B.
git init
C.
git create
D.
git new
Question 2 of 20
Which command shows the current status of your repository?
A.
git check
B.
git status
C.
git info
D.
git state
Question 3 of 20
Which command stages all modified files for commit?
A.
git add .
B.
git commit -a
C.
git stage all
D.
git push .
Question 4 of 20
Which command creates a new commit with a message?
A.
git save "message"
B.
git commit -m "message"
C.
git push -m "message"
D.
git add -m "message"
Question 5 of 20
Which command uploads local commits to a remote repository?
A.
git upload
B.
git push
C.
git send
D.
git sync
Question 6 of 20
Which command downloads changes from a remote repository and merges them?
A.
git clone
B.
git fetch
C.
git pull
D.
git merge
Question 7 of 20
Which command lists all local branches?
A.
git branch
B.
git list-branch
C.
git branches
D.
git show-branch
Question 8 of 20
Which command creates and switches to a new branch named feature-x?
A.
git checkout feature-x
B.
git branch feature-x
C.
git checkout -b feature-x
D.
git switch feature-x -n
Question 9 of 20
Which command merges branch feature-x into the current branch?
A.
git merge feature-x
B.
git join feature-x
C.
git combine feature-x
D.
git pull feature-x
Question 10 of 20
Which command shows commit history?
A.
git history
B.
git log
C.
git commits
D.
git show-log
Question 11 of 20
Which command unstages a file added by mistake?
A.
git remove file.txt
B.
git reset file.txt
C.
git undo file.txt
D.
git checkout file.txt
Question 12 of 20
Which command copies a remote repository locally?
A.
git copy
B.
git fetch
C.
git clone
D.
git pull
Question 13 of 20
Which command adds a remote named origin?
A.
git remote add origin <url>
B.
git add remote origin <url>
C.
git origin add <url>
D.
git remote create origin <url>
Question 14 of 20
Which command sets your Git username globally?
A.
git config --global user.name "Rahul"
B.
git user --set Rahul
C.
git config user Rahul
D.
git set user.name Rahul
Question 15 of 20
Which file is used to ignore tracked patterns?
A.
.gitignore
B.
.ignoregit
C.
git.ignore
D.
.gitexclude
Question 16 of 20
Which command shows unstaged changes?
A.
git status
B.
git diff
C.
git changes
D.
git log -p
Question 17 of 20
Which command creates a tag named v1.0?
A.
git mark v1.0
B.
git tag v1.0
C.
git label v1.0
D.
git version v1.0
Question 18 of 20
Which command switches to an existing branch named dev?
A.
git move dev
B.
git checkout dev
C.
git branch dev
D.
git merge dev
Question 19 of 20
Which command shows configured remotes?
A.
git remote -v
B.
git remotes
C.
git show remote
D.
git remote show all
Question 20 of 20
Which command temporarily saves uncommitted changes?
A.
git temp
B.
git save
C.
git stash
D.
git hold
← Back
Submit Answers ✓