0
0
Gitdevops~10 mins

Deleting remote 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 delete a remote branch named 'feature' using git.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
A--delete feature
Bdelete feature
C-d feature
Dremove feature
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which deletes local branches, not remote.
Using 'delete' without dashes, which is not a valid git flag.
2fill in blank
medium

Complete the command to delete the remote branch 'bugfix' from the remote named 'upstream'.

Git
git push [1] --delete bugfix
Drag options to blanks, or click blank then click option'
Aremote
Borigin
Cupstream
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'origin' when the remote is actually named 'upstream'.
Using 'master' which is a branch name, not a remote.
3fill in blank
hard

Fix the error in the command to delete remote branch 'test' from 'origin'.

Git
git push origin [1] test
Drag options to blanks, or click blank then click option'
Adelete
B-d
Cremove
D--delete
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which deletes local branches.
Using 'delete' or 'remove' without dashes, which are invalid.
4fill in blank
hard

Fill both blanks to delete the remote branch 'release' from remote 'origin' and then verify the branch list.

Git
git push [1] [2] release && git branch -r
Drag options to blanks, or click blank then click option'
Aorigin
B--delete
C-d
Dupstream
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which deletes local branches.
Using wrong remote names like 'upstream' if not configured.
5fill in blank
hard

Fill all three blanks to delete remote branch 'hotfix', fetch updates, and prune deleted branches.

Git
git push [1] [2] hotfix && git fetch [3] --prune
Drag options to blanks, or click blank then click option'
Aorigin
B--delete
Dupstream
Attempts:
3 left
💡 Hint
Common Mistakes
Using different remote names inconsistently.
Forgetting the '--prune' flag to clean up deleted branches.