-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Exercise_ID: sensors-diff
Lesson
https://git-mastery.github.io/lessons/diff/
Exercise learning outcomes
Able to use diff to compare points in history, including staging area and working directory
Exercise setup
Inputs to the new.sh:
Exercise name: {{ Exercise_ID }}
Tags (space separated): git-diff
Requires Git? (defaults to y) [y/N]: y
Requires Github? (defaults to y) [y/N]: y
Exercise repo type (local, remote, or ignore) (defaults to 'local'): remote
Exercise repo name (defaults to ...): sensors
Git-Mastery Github repository title (defaults to ''): gm-sensors
Create fork of repository? (defaults to y) [y/N]: N
Clone https://github.com/git-mastery/gm-sensors as sensors
Run the following commands:
echo -e "5193\n8042\n6721\n4389\n2075\n9510\n3642\n7281\n5904\n1837\n4416\n9032\n7765\n6208\n3589\n8471\n2940\n1683\n7352\n5129" > west.csv
echo -e "6841\n2307\n9754\n4169\n5823\n3086\n7590\n8420\n1679\n5034\n2918\n7645\n8301\n4576\n9208\n3461\n5789\n6940\n1235\n8890" > north.csv
echo -e "7412\n5068\n8921\n3754\n2809\n6197\n4531\n9674\n1185\n7326\n5401\n8937\n2640\n7083\n5914\n3208\n8745\n4069\n1592\n6831" > south.csv
git add north.csvInstructions for students
[Scenario: A system is using Git to record data received daily from for sensors, each monitoring one of directions east, west, north, south. Each sensor provides 20 integer values, which are stored in a csv file (e.g., values from the sensor monitoring the east direction are recorded as east.csv). Data for each day is recorded as one commit.
Task:
See https://git-mastery.github.io/lessons/diff/exercise-sensors-diff.html
Exercise grading
Verify the answers are correct
Q: Which are the new values in staged files?
A: 7590
Q: Which are the new values in modified but unstaged files?
A: 4531 3642
Q: Which files have changed from Jan 09th to Jan 15th?
A: north.csv south.csv west.csv
Q: Which new values are new in north.csv on Jan 10th, compared to Jan 01st?
A: 3471
Requires remote repository?
Yes
Additional remarks
No response