0
0
Gitdevops~10 mins

Pushing new branches to remote in Git - Interactive Code Practice

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

Complete the command to push the current branch to the remote repository.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
Amaster
BHEAD
Cmain
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using a fixed branch name like 'master' or 'main' when you are on a different branch.
Using a generic word like 'branch' which is not a valid Git ref.
2fill in blank
medium

Complete the command to create and push a new branch named 'feature' to the remote.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
Afeature:feature
Bfeature
Cfeature^
Dfeature~
Attempts:
3 left
💡 Hint
Common Mistakes
Just using 'feature' requires you to be currently checked out on the 'feature' branch.
Using caret (^) or tilde (~) are for commit references, not branch names.
3fill in blank
hard

Fix the error in the command to push a new branch 'dev' to remote 'origin'.

Git
git push [1] dev
Drag options to blanks, or click blank then click option'
Aorigin/dev
Borigin dev
Corigin
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Adding the branch name twice or combining remote and branch with a slash.
Using the branch name as the remote.
4fill in blank
hard

Fill both blanks to push the local branch 'test' to remote branch 'testing'.

Git
git push [1] [2]:testing
Drag options to blanks, or click blank then click option'
Aorigin
Btest
Cmain
Dfeature
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping remote and branch names.
Using a branch name that does not exist locally.
5fill in blank
hard

Fill the blanks to push the current branch to remote and set upstream tracking.

Git
git push --set-upstream [1] [2]
Drag options to blanks, or click blank then click option'
Aorigin
BHEAD
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using a specific branch name like 'main' instead of HEAD.
Omitting the --set-upstream flag.