Multiple choice question

You are a collaborator on a project stored in GitHub and you already cloned the repository (nicknamed origin) to your local directory. You have been tasked with correcting a collaborators newly commited file (‘clinicians.txt’) and then re-sharing your modifications.

Which of the following protocols would you choose?

  1. git pull clinicians.txt; **make modifications; **git push clinicans.txt
  2. git pull clinicians.txt; **make modifications; **git add clinicians.txt; git commit –m ‘Final modifications’;git push clinicians.txt
  3. git pull origin master; **make modifications**; git add clinicians.txt; git commit –m ‘Final modifications’; git push origin master;
  4. git clone origin; ** make modifications **; git add clinicians.txt; git commit –m ‘Final modifications’; git push origin master

Fill in the blanks question

In order to use the command line to set up a new Git repository from an existing folder on our computer (local repository) we would first use the git _\_(1)____ command to set up an empty Git repository. In order to connect our local repository to the git repository we use the _\_(2)____command, which requires two pieces of information; 1) the nickname for the local repository and 2) the URL. The files in our local repository can now be tracked using git ___(3)__\_, after which they are ready to commit and held in the ___(4)____ area on the repository. Use git __\_(5)____ to send changes to the git repository and git _\_(6)____ to download changes. A collaborator may copy the git repository using the git _\_(7)____ command, but you will have to add them to the collaborators list on GitHub to enable them to commit changes.