0
0
Gitdevops~10 mins

git push to upload commits - Interactive Code Practice

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

Complete the code to upload your commits to the remote repository.

Git
git [1]
Drag options to blanks, or click blank then click option'
Apush
Bcommit
Cpull
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git commit' instead of 'git push' to upload changes.
Using 'git pull' which downloads changes instead of uploading.
Using 'git clone' which copies a repository instead of pushing.
2fill in blank
medium

Complete the code to push commits to the remote branch named 'main'.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
Afeature
Bdevelop
Cmain
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'master' when the repository uses 'main' as default.
Using a branch name that does not exist locally.
Forgetting to specify the branch name when pushing.
3fill in blank
hard

Fix the error in the command to push commits to the remote repository.

Git
git [1] origin main
Drag options to blanks, or click blank then click option'
Afetch
Bpush
Ccommit
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git pull' which downloads changes instead of pushing.
Using 'git commit' which only saves changes locally.
Using 'git fetch' which only updates remote tracking branches.
4fill in blank
hard

Fill both blanks to push the current branch to the remote repository and set it to track the remote branch.

Git
git [1] --set-upstream origin [2]
Drag options to blanks, or click blank then click option'
Apush
Bpull
Cmain
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git pull' instead of 'git push' for uploading.
Using 'commit' which only saves locally.
Using wrong branch name that does not exist.
5fill in blank
hard

Fill all three blanks to push all local branches to the remote repository.

Git
git [1] --all [2] [3]
Drag options to blanks, or click blank then click option'
Apush
Borigin
C--verbose
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'push' for uploading.
Forgetting to specify the remote name.
Not using '--all' to push all branches.