0
0
Gitdevops~10 mins

Listing branches in Git - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to list all local branches in Git.

Git
git [1]
Drag options to blanks, or click blank then click option'
Abranch
Bcheckout
Ccommit
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git checkout' which switches branches instead of listing them.
Using 'git commit' which saves changes, not related to branches.
Using 'git push' which sends changes to remote, not listing branches.
2fill in blank
medium

Complete the code to list all branches, including remote branches.

Git
git [1] -a
Drag options to blanks, or click blank then click option'
Astatus
Blog
Cfetch
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status -a' which is invalid.
Using 'git log -a' which shows commit logs, not branches.
Using 'git fetch -a' which fetches updates but does not list branches.
3fill in blank
hard

Fix the error in the command to list remote branches only.

Git
git [1] -r
Drag options to blanks, or click blank then click option'
Abranch
Bremote
Cpush
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git remote -r' which is not a valid command.
Using 'git push -r' which pushes changes, not lists branches.
Using 'git clone -r' which clones repositories, not lists branches.
4fill in blank
hard

Fill both blanks to list all branches.

Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Abranch
B-v
C-a
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status' which does not list branches.
Using '-v' alone which shows verbose info but not all branches.
5fill in blank
hard

Fill all three blanks to list all branches with verbose and remote info.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Abranch
B-v
C-a
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-r' instead of '-a' which excludes local branches.
Omitting '-v' which hides commit info.