The Daily Parker

Politics, Weather, Photography, and the Dog

Git yourself over here

Stack Overflow recently had a good blog entry on Git branching:

When trying to imagine how branches work, it’s tempting to use the concept of “folders.” After all, creating a new branch feels very much like copying the project’s current state and pasting it into a new, separate folder.

But part of the genius behind Git is that it doesn’t just “copy all contents” of your project, which would make things slow and use up lots of disk space. It’s much smarter than that!

[C]ommits in Git are identified by their SHA-1 hash, those 40-character long, cryptic strings. These commit hashes are static and immutable. Branches, on the other hand, are highly flexible, always changing to the commit hash of the latest commit anytime you create a new commit in that branch.

Speaking of Git, I'm moving to the next phase of my big at-home project. The end, while not in sight exactly, has gotten much more predictable. (In software, predictability is a good thing.)

Comments are closed