Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKjetil-Lennart A. Lorentzen
13,390 PointsThe Diff-thing
I tried to do this:
diff NewVersion OldVersion
-> It said stuff was deleted
diff OldVersion NewVersion
-> Showed that files were added.
I don't know if this is something people see as "well duh, of course" or not, but i think it would be worth mentioning, as i didn't hear it in the video
1 Answer
Steven Parker
231,198 PointsThe order of files determines how the output will be shown. What "diff" does is show what changes must be made to the first file to create the second one.
So if you list oldest first, it will show what was actually done. But if you list newest first, it will show what would need to be done to the new file to put it back the way it was.
Kjetil-Lennart A. Lorentzen
13,390 PointsKjetil-Lennart A. Lorentzen
13,390 PointsYes, exactly what i meant, but! you put it in better words. As always Steven, thank you