introduction to git and github coursera quiz answers

Introduction to Version Control Week One of Introduction to Git And GitHub






 Practice Quiz: Before Version Control

Question 1
Your colleague sent you a patch called fix_names.patch, which fixes a config file called fix_names.conf. What command do you need to run to apply the patch to the config file?

  • patch fix_names.conf < fix_names.patch

Question 2
You're helping a friend with a bug in a script called fix_permissions.py, which fixes the permissions of a bunch of files. To work on the file, you make a copy and call it fix_permissions_modified.py. What command do you need to run after solving the bug to send the patch to your friend?

  • patch fix_permissions.py > fix_permissions.patch

Question 3
The _____ commandhighlights the words that changed in a file instead of working line by line.

  • vimdiff

Question 4
How can we choose the return value our script returns when it finishes?

  • Using the exit command from the sys module

Question 5
In addition to the original files, what else do we need before we can use the patch command?

  • Diff file

Practice Quiz: Version Control Systems


Question 1
How can a VCS (Version Control System) come in handy when updating your software, even if you’re a solo programmer? Check all that apply.

  • Git retains local copies of repositories, resulting in fast operations.
  • If something breaks due to a change, you can fix the problem by reverting to a working version before the change.
  • Git allows you to review the history of your project.

Question 2
Who is the original creator and main developer of the VCS (Version Control System) tool Git?

  • Linus Torvalds

Question 3
_____ is a feature of a software management system that records changes to a file or set of files over time so that you can recall specific versions later.

  • Version Control

Question 4
A _____ is a collection of edits which has been submitted to the version control system for safe keeping.

  • Commit

Question 5
Within a VCS, project files are organized in centralized locations called _____ where they can be called upon later.

  • repositories

Practice Quiz: Using Git



Question 1
Before changes in new files can be added to the Git directory, what command will tell Git to track our file in the list of changes to be committed?

  • git add

Question 2
Which command would we use to review the commit history for our project?

  • git log

Question 3
What command would we use to make Git track our file?

  • git add

Which command would we use to look at our config?

  • git config -l

Question 5
Which command would we use to view pending changes?

  • git status


Buy me a coffee

Back to top