This is only a "quiz" in the loosest sense that it's asking questions whose answers will be part of your grade. Please use any resources you want, as long as you list those resources (e.g. peers, websites, etc.)
-
What is the SHA for the last commit made by Prof. Xanda on the branch xanda_0000_movie_processing? (For this and future questions, the first 5 characters is plenty - neither Git nor I need the whole SHA.) 9b257
-
What is the SHA for the last commit associated with line 9 of this file? b2ed3
-
What did line 12 of this file say in commit d1d83? "2. I should really finish writing this."
-
What changed between commit e474c and 82045? The commit message of "Fixed two bugs: sorting prices by string + only getting top 4" tells us that a type and an index bug were fixed in this commit.
Assume at the start of each of these three questions that your
branch for switching to a top-10 list was called top_ten
and your branch generalizing to any number of movies was called top_N
.
Predict the behavior of these three possible operations - you don't
have to provide a full diff
but you should describe at a high level
what changes would happen.
These questions are supposed to be separate paths, not cumulative; for example, you should not assume that the operations of 5 were run before 6. When testing outcomes later in the lab, you should make sure to revert back to the state of the branch before you started these questions.
- What do you think would happen if you ran the following commands? What branches would change, and how?
git checkout test
git merge top_N
Merges top_N into test. top_N therefore stays the same, test would change. It get the code for n movies into the present code for 5 movies
- What do you think would happen if you ran the following commands? What branches would change, and how?
git checkout top_ten
git merge test
Merges test into top_ten, with test staying the same. It will probably lead to a merge conflict.
- What do you think would happen if you ran the following commands? What branches would change, and how?
git checkout test
git rebase top_ten
git rebase top_N
Gets the changes from the different branches into test, but causes a merge conflict as top_ten and top_N have made conflicting changes to the python file.