0
0
Intro to Computingfundamentals~10 mins

Version control concept (Git) in Intro to Computing - Interactive Code Practice

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

Complete the code to initialize a new Git repository.

Intro to Computing
git [1]
Drag options to blanks, or click blank then click option'
Ainit
Bcommit
Cclone
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'init' which records changes but does not create a repo.
Using 'clone' which copies an existing repo, not creates a new one.
2fill in blank
medium

Complete the command to save changes to the local repository.

Intro to Computing
git [1] -m "Save changes"
Drag options to blanks, or click blank then click option'
Astatus
Bpush
Cpull
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' which sends changes to a remote repository, not saving locally.
Using 'pull' which fetches changes from remote, not saving changes.
3fill in blank
hard

Fix the error in the command to upload local commits to the remote repository.

Intro to Computing
git [1] origin main
Drag options to blanks, or click blank then click option'
Acommit
Bfetch
Cpush
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' which only saves locally.
Using 'clone' which copies a repo, not uploads changes.
4fill in blank
hard

Fill both blanks to create a new branch and switch to it.

Intro to Computing
git [1] [2]
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Cmerge
D-b
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' which combines branches but does not create or switch.
Using 'status' which shows repo status but does not affect branches.
5fill in blank
hard

Fill all three blanks to list all branches and show the current branch.

Intro to Computing
git [1] && git [2] -v && git [3]
Drag options to blanks, or click blank then click option'
Abranch
Bstatus
Clog
Ddiff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'log' which shows commit history, not branches.
Using 'diff' which shows changes, not branch list.