Homework 2: Git on the Stage
Some questions will ask you to submit a file. You should combine all of your files into a zip folder named ANDREWID.zip and submit it at
this
Dropbox File Request link. Your zip folder should contain the hw2repo folder and the q2.txt text file.
- Clone the git repository located at
YOUR_ANDREW_USERNAME@unix.andrew.cmu.edu:/afs/andrew.cmu.edu/course/98/174/public/hw2repo
. Be sure to replace the YOUR_ANDREW_USERNAME part with your Andrew username. Git will ask you for your Andrew password, since it is retrieving it from the unix.andrew.cmu.edu
machines.
- Make some modification to only file1.txt, then commit it, with a well written commit message.
- Make some modification to both file1.txt and file2.txt, then commit it, with a well written commit message.
- Create some file file3.txt, and commit it, with a well written commit message.
-
In a file called q2.txt, answer the following questions on separate
lines, then submit the file:
- Give an example of a good commit message.
- Give an example of a bad commit message.
- Examine the following screenshot and note how fileA appears
in both "Changes to be committed" and "Changes not staged
for commit". This sounds like a contradiction (though it's not).
Explain what happened and what commands were most likely entered to
reproduce this screenshot. You may assume fileA and
fileB are the only files in this repository.
← Back to home