nusco / cookbook

The old demo project for the (nor retired) "How Git Works" and "Mastering Git" trainings.
http://app.pluralsight.com/author/paolo-perrotta
12 stars 79 forks source link

Was the spaghetti branch created before tweaking the master branch or after it? #2

Closed DevotionGeo closed 7 years ago

DevotionGeo commented 7 years ago

You tweaked the master branch and added the spaghetti branch (off the camera) in between the 2nd and 3rd module. It isn't explained that the spaghetti branch was created before changing the master branch or after it.

nusco commented 7 years ago

I created "spaghetti" before tweaking "master". Then I put additional stuff on both "master" and "spaghetti", independently.

Or, better yet: it doesn't really matter at which time the other branch was created - what matters is that it doesn't contain the latest stuff from "master". It's also possible that I changed "master", then checked out an earlier commit, and created "spaghetti" there. The point of the example is: the two branches diverged, and now each branch contains some stuff that the other branch didn't. (This note might seem like nitpicking, but it becomes important later, when we introduce networking. Two developers might be working in parallel on the same data, and their content diverges. At that point, it doesn't really matter who did what "first" - just that the content has diverged).

Does that make it clear?

DevotionGeo commented 7 years ago

Thank You for the reply. After asking the question I assumed that the "spaghetti" was created before tweaking the master, so it didn't have latest changes from master. I followed it that way and it made sense.

It's the best tutorial I followed on Git. Thank you for the great work!

nusco commented 7 years ago

Thank you, and enjoy! 😃

DevotionGeo commented 7 years ago

You're welcome! :)