Skip to content

Blog

Mastering Git: The Snapshot Database That Powers Your Workflow

You’ve likely used Git daily—committing code, pushing updates, pulling changes. It hums along smoothly until chaos strikes: a botched rebase at midnight, frantic Stack Overflow searches, and crossed fingers that things don’t spiral further. Even seasoned developers often treat Git like a black box, memorizing commands without grasping the mechanics. In this guide, we’ll dismantle Git from its core, rebuilding your understanding so you command it confidently.

At its heart, Git is a database of snapshots, where the atomic unit is the commit. Forget diffs or change lists—a commit captures your entire project state at a precise moment. Every file, unchanged or modified, frozen in time.

Each commit holds:

  • A full snapshot pointer (your codebase as-is).
  • Metadata (author, timestamp, message).
  • A pointer to its parent commit—the previous state.

New commits link backward, forming a chain: child to parent, parent to grandparent, back to the initial commit (with no parent). Merges later introduce commits with two parents, but the rule holds: pointers always flow backward. Parents remain oblivious to future offspring.

This setup yields a linear history for solo sequential commits. Real teams branch for features or fixes, creating diverging paths from shared parents. Merges reconnect them, birthing a DAG (Directed Acyclic Graph):

  • Directed: One-way arrows (children → parents).
  • Acyclic: No loops—history can’t circle back.
  • Graph: Nodes (commits) + edges (parent links).

Visualize it as an inverted family tree encoding every project decision. Git’s magic? Every commit’s completeness lets you teleport to any node, restoring the exact project state—no change replay needed.

Branches intimidate newcomers, evoking visions of duplicated codebases. Wrong. A branch is a sticky note—a lightweight file storing one commit hash.

  • git branch feature/login crafts a note at the current commit.
  • Commits ignore branches; branches chase commits.

Commit on a branch? Git adds the snapshot (parented to prior), then nudges the branch pointer forward. Creation is instantaneous—no copying.

main (or master)? Just the canonical sticky note. Multiple branches = multiple labels on the DAG.

Enter HEAD, Git’s cursor. Typically, it points to a branch (e.g., HEAD → main → commit). Switch branches (git checkout feature), and HEAD shifts.

Checkout a raw hash? HEAD detaches, pointing directly to the commit—“detached HEAD” state. Work proceeds: edit, stage, commit. But stray too far, and new commits orphan—no branch anchors them. Git’s garbage collector eventually prunes them.

Classic pitfall: Inspecting an old commit, fixing a bug, committing, then git checkout main. Poof—orphan commits vanish. heed the warning: branch first to preserve work.

Git juggles three realms:

  1. Working Directory: Your editable files (editor-visible).
  2. Staging Area (Index): Prep zone for the next commit.
  3. Repository: Immutable commit database.

Edit files → changes hit working directory (Git observes silently). git add → stage for commit. git commit → snapshot to repo. This triad makes nuanced commands possible.

Three “undo” tools, each with distinct behavior:

git checkout main or git checkout <hash> repositions HEAD. Working directory syncs to the target snapshot. Branches/commits untouched—just sightseeing history.

On main, git reset <commit> yanks main’s pointer back, orphaning ahead-commits. Modes dictate side effects:

ModeBranch MovesStagingWorking DirectoryUse Case
--softYesUnchangedUnchangedSquash commits (staged changes ready).
--mixed (default)YesReset to targetUnchanged (unstaged)Restage/split commits.
--hardYesResetReset (data loss!)Nuke uncommitted work—use sparingly.

--hard devours uncommitted files forever. Orphaned commits linger briefly (reflog-rescu-able); unstaged work? Eternal void.

No rewinds—git revert <commit> births a new commit undoing the target (e.g., +50 lines → -50 lines). History intact, auditable. Use for shared/pushed changes.

Quick Reference:

  • Checkout: Explore → safe.
  • Reset: Reshape local → cautious.
  • Revert: Amend shared → collaborative.

Feature branch forked pre-main advances (X, Y)? Integrate via:

  • Merge: Two-parent commit preserves parallel truth (messy but honest).
  • Rebase: Replay your commits atop new main.

Commits aren’t movable—their hash derives from content + metadata + parent. Rebase:

  1. Extracts changes from your commits (B → diff, C → diff).
  2. Applies atop tip (Y → B’ → C’).
  3. Repoints branch to C’; orphans B/C.

Power for local cleanliness; poison for shared history—colleagues’ clones see “new” commits, sparking duplicate/conflict hell. Rebase solo; merge teams.

Disaster? git reflog logs HEAD’s travels: checkouts, commits, resets. “Lost” commits (post-reset/rebase) often persist here. git branch recovery <hash> revives them. Git delays deletion (30-90 days)—act fast.

Git: Snapshot DAG. Branches/HEAD as pointers. Three trees for precision. Checkout views; reset reshapes; revert augments; rebase replays. Reflog recovers.

Next Git snag? Trace the graph. No more blind commands—you know.

Vedic Cosmology and Modern Physics: Where the Parallels Hold and Where They Break

Physicists have quoted Sanskrit texts for a century. Oppenheimer recited the Bhagavad Gita at the first atomic test. Schrödinger wrote about Vedanta in What is Life?. Those citations are real and well documented. The question this post examines is different: does Vedic cosmology actually describe modern physics, or do the parallels only look convincing from a distance?

The famous Oppenheimer quote is genuine. At the Trinity test in July 1945, he later recalled a line from the Bhagavad Gita, Chapter 11: “Now I am become Death, the destroyer of worlds.” He was not endorsing a cosmology. He was reaching for language to describe the scale of what he had helped build.

Erwin Schrödinger’s interest in Vedanta is also genuine. In What is Life? (1944), he drew on the Upanishads to illustrate the idea that individual consciousness is not cleanly separable from the world around it. That is a philosophical position, not a physical derivation. It did not appear in his wave equation.

These borrowings are real. They are also selective. Physicists quoted the texts that matched their mood or their metaphysics, not the texts that made testable predictions.

The popular comparisons usually land on three ideas:

  1. A universe from a point. The Vedas describe creation emerging from a single source. Cosmology describes the Big Bang as an expansion from a hot, dense state. The shape is similar; the content is not. The Vedic account is narrative and theological. The Big Bang is a model fitted to redshift observations and cosmic microwave background data.

  2. Cycles of expansion and collapse. Hindu cosmology runs on vast repeating cycles (yugas). Some cosmological models consider cyclic universes. The similarity is structural, not evidential. No cyclic model is currently supported by observation.

  3. Sound and vibration. The Vedic tradition treats sound (nāda) as fundamental. String theory describes vibrating objects as the basis of matter. Both use the word “vibration.” They share no mathematics. The Om syllable is not a wave function.

The decisive difference is method. The rishis produced insight through introspection, meditation, and oral transmission. Physics produces results through measurement, falsifiable prediction, and peer review.

A parallel is not a mechanism. Two descriptions can rhyme without either one explaining the other. “The universe is consciousness” and “the universe is a wave function” sound adjacent. They are not the same claim, and neither one follows from the other.

There is also a selection effect at work. Vedic literature is vast and contains many statements about the cosmos. With enough text, you can find phrases that resemble almost any modern discovery. Finding a resemblance after the fact is pattern matching. It is not anticipation.

The honest value of this material is cultural and philosophical, not predictive.

  • The Bhagavad Gita gave Oppenheimer words for a moment that had no precedent. That is a real fact about how humans process scale and responsibility.
  • Schrödinger’s engagement with Vedanta is a documented example of a scientist thinking across traditions. It tells us something about creativity, not about quantum mechanics.
  • Vedic cosmology is worth studying as cosmology: a sophisticated, internally consistent worldview developed without telescopes or instruments. It is remarkable on its own terms.

The intellectual tradition of the Vedas is genuinely rich. It does not need modern physics to validate it. And modern physics does not need ancient texts to validate it either. Both traditions are diminished when one is forced to be a prophecy of the other.

The parallel is a poem. The physics is a measurement. Enjoy the poem, check the measurement, and do not confuse the two.

Niagara Falls' Forgotten Subterranean Power Network

Niagara Falls, a spectacle of nature drawing millions annually, conceals a labyrinth of colossal tunnels etched into the bedrock—relics of an era when the roaring cascade powered North America’s industrial dawn. These vast conduits, once pulsing with diverted river water to drive mills and pioneer hydroelectric plants, now lie sealed, flooded, or repurposed, their existence betrayed only by subtle scars on the gorge walls above.

From Hydraulic Canals to Electric Revolution

Section titled “From Hydraulic Canals to Electric Revolution”

The transformation began in the mid-19th century. In 1853, the Falls Hydraulic Power and Manufacturing Company initiated construction of a hydraulic canal on the American side, completed by 1861. This channeled Niagara’s torrent into subterranean millrace tunnels—narrow passages, 8 to 12 feet high, hand-chiseled through Lockport dolomite and underlying shale. Water surged through gated inlets, accelerating down sloped conduits to spin massive wheel pits beneath factories producing paper, flour, and chemicals.

By the 1880s, the “War of Currents” refocused ambitions on electricity. Thomas Edison’s DC vied against Nikola Tesla and George Westinghouse’s AC. In 1893, an international commission awarded Westinghouse the contract for Niagara’s first large-scale AC plant. Adams Power Station No. 1 went online in 1895, its 1,400-foot tailrace tunnel—a horseshoe-shaped behemoth, 18-20 feet across—discharging turbine exhaust beneath the gorge. On November 16, 1896, power reached Buffalo, 26 miles distant, proving AC’s long-distance viability.

Canadian efforts mirrored this scale. The Ontario Power Company in 1904 excavated over 2,000 feet of tunnels near Horseshoe Falls, blending exposed dolomite with concrete-brick linings to navigate softer shale layers. These fed 15 turbines, propelling southern Ontario’s grids. Nearby, the Toronto Power Generating Station’s 2,200-foot tailrace, completed in 1907 by immigrant laborers amid lantern-lit blasts, featured meticulously laid brick arches to tame turbulent flows.

Further expansions crowned Schoellkopf Power Station on the U.S. side as the region’s mightiest by the 1920s. Its networked tunnels—some walkable upright—interlinked multiple generating houses, channeling water through 150-foot penstocks into shared discharge channels.

Technological leaps and geopolitical shifts doomed these pioneers. U.S.-Canada treaties in the 1940s-50s redirected flows to modern behemoths like the Robert Moses Niagara Power Plant (opened 1961) and Canada’s Sir Adam Beck stations. Private plants faltered: Adams closed in 1961, its tunnel flooding with groundwater; Ontario Power shuttered in 1999 after 93 years; Toronto Power ceased in 1974.

Catastrophe sealed Schoellkopf’s fate. On June 7, 1956, a gorge wall seep escalated into collapse. Rock sheared away, snapping penstocks and flooding tunnels as three generating houses plunged into the river. The ruins persist as eerie overlooks in Niagara Falls State Park, but subsurface remnants were obliterated.

Most tunnels endure as flooded voids, their precise conditions probed via ground-penetrating radar or remote inspections. Adams’ tailrace remains submerged beneath its preserved brick landmark. Ontario Power’s brick-lined passages hold firm under hydrostatic pressure, inaccessible save through sealed ports.

Yet one defies oblivion: the Toronto Power tailrace. In 2021, Niagara Parks launched restoration, clearing debris and installing a walkway. By 2023, the 2,200-foot tunnel reopened as “The Tunnel at Niagara Parks Power Station”—a public marvel where visitors trace brick arches to a dramatic gorge portal once roaring with discharge. Tours like Niagara Underground persist, though occasional closures occur due to ice damage or maintenance.

Above, the stark concrete station eyes redevelopment. In 2024, Niagara Parks advanced procurement for a mixed-use revival—potentially a hotel and visitor hub—blending heritage with tourism, backed by Ontario government support.

These hidden arteries underscore Niagara’s pivot from raw mechanical might to efficient public hydro giants. Ground surveys reveal intact 19th-century voids under warehouses, but public glimpses are rare. As modern plants like Robert Moses churn 2.6 gigawatts clean energy, the tunnels whisper of audacious engineering that tamed a wonder for the world. Venture below on guided walks, and feel the pulse of history amid the falls’ eternal roar.

Yet, as we marvel at these subterranean cathedrals, we must pause to remember the hands that carved them. This wasn’t just a triumph of engineering; it was a grueling labor of blood. Thousands of immigrant workers—many Italian, Polish, and Irish—toiled in damp, lantern-lit darkness, blasting through volatile shale with primitive dynamite. Accidents were common, and deaths were tragically frequent, often relegated to footnotes in the grand narrative of industrial progress. These tunnels are their monument as much as they are Westinghouse’s or Tesla’s. To walk them is to tread on the sacrifice that powered a continent.

Atom: The IDE That Accidentally Built Its Own Killer

On June 25, 2015, Chris Wanstrath celebrated Atom 1.0’s stable release—a free, open-source code editor built on web technologies that promised to democratize development. What started as a passion project in 2007, sparked by a chance meeting at a Ruby meetup where Wanstrath encountered Tom Preston-Werner demoing an early GitHub prototype called Grit, evolved into a hackable editor inspired by Emacs but powered by HTML, CSS, and JavaScript.

Atom’s journey wasn’t smooth. Shelved amid GitHub duties, it revived in 2011 using the ACE editor in a WebView, then pivoted to Chromium Embedded Framework and Node.js via Node-WebKit in 2012. This fusion birthed “Atom Shell”—a tool so potent it was rebranded Electron in 2015, decoupling it from Atom to fuel cross-platform desktop apps.

Electron’s appeal was immediate: leverage familiar web stacks for native-like apps, sidestep C++ hurdles of frameworks like Qt, enable rapid iterations, and reuse web codebases. Developers flocked to it for projects beyond editing, and giants followed—Slack, Discord, Microsoft Teams all run on Electron today, powering billions of interactions.

Atom’s 2014 beta exploded in popularity amid a surge in new programmers, its lightweight design and package ecosystem outshining bloated incumbents like Visual Studio. Backlash over its initial closed-source status echoed Wanstrath’s open-source advocacy, but relicensing under MIT quelled critics, growing its user base to over 1.1 million.

Yet Electron’s bloat—bundling full Chromium and Node.js per app—haunted performance. Atom took seconds to open small files, guzzling 400MB RAM. Enter Microsoft’s Visual Studio Code (VS Code) in 2015, built on Monaco (evolved from their browser editor) and Electron. Skeptics dismissed it, but optimizations shone: isolated extension processes, pre-optimized Monaco, binary encoding. VS Code launched 4x faster, went fully open-source, and birthed a thriving marketplace.

The 2018 Microsoft-GitHub acquisition for $7.5B raised alarms. New CEO Nat Friedman promised dual support on Reddit, but reality diverged—VS Code iterated monthly while Atom stagnated, commits plummeting 76% in six months. By 2022, Atom sunsetted, repositories archived by late 2022, with Microsoft pivoting to cloud tools like GitHub Codespaces. Community forks like Pulsar emerged, but Atom’s era ended.

Atom’s legacy? Electron endures. VS Code dominates 2025 surveys—15-54% market share per PYPL and Stack Overflow data—holding off AI challengers despite Cursor’s 18% adoption and Zed’s buzz. Cursor, a VS Code fork with AI-native features like Composer and Visual Editor, hit $500M ARR by mid-2025, serving half the Fortune 500 with real-time collaboration and agent workflows. Zed, Rust-powered by ex-Atom contributors, gained Windows support in October 2025, previewing Dev Containers and AI commits, amassing momentum.

Electron powers it all: VS Code’s blinking cursors carry Atom’s ghost. In open source, death spawns successors—Zed’s 70K+ stars, Cursor’s explosive growth. As 2025 Stack Overflow data shows developers craving AI tools atop proven editors, Atom didn’t lose; its killer became the industry standard, forked eternally.

But there’s a deeper story here than just software genealogy. Zed isn’t just a spiritual successor; it’s a personal redemption. Nathan Sobo, the original creator of Atom, is also the architect behind Zed. For him, the pivot from Electron (which he helped pioneer) to Rust wasn’t just a technical decision—it was a correction of his own legacy’s greatest flaw: performance. In an industry obsessed with “new,” there’s profound poetry in a creator returning to fix what he broke, proving that open source isn’t just about codebases, but about the people who learn, fail, and build again.

ArcaOS: Breathing New Life into IBM's Legendary OS/2 on Today's PCs

In the late 1980s, IBM and Microsoft teamed up to birth OS/2, an operating system hailed as the future of personal computing. Even Bill Gates called it “the most important operating system—and possibly program—of all time.” Yet, Windows eclipsed it, relegating OS/2 to niche roles like ATMs and New York City’s subway MetroCard system. That system is phasing out in 2024. Despite this, OS/2 endures in specialized corners, thanks to projects like ArcaOS—a fully licensed, modernized evolution of OS/2 designed for contemporary hardware.

Announced in 2015 as a successor to the stagnant eComStation (unchanged since 2011 and still available for $340), ArcaOS remains actively developed. Its latest release, 5.0.7 from late 2021, promises a 5.1 update soon. Priced at over $100 for personal use (or $200 for commercial), it’s not for casual users but ideal for running legacy OS/2 apps without vintage hardware or finicky virtualization.

ArcaOS ships as a 1.3GB disk image, requiring a DVD or USB for installation—CDs won’t cut it. Tested on a Dell Latitude D610 (a mid-2000s laptop hostile to original OS/2 Warp installs), the process shines with modern hardware support.

Booting defaults to the Workplace Shell installer, OS/2’s iconic object-oriented desktop. Select large fonts for visibility, tweak input settings, and access a utility desktop for troubleshooting. Agree to the license, choose a “personality” like single-volume default, and manage partitions via DFSee-like tools. Opt for JFS (Journaled File System) over HPFS, set location defaults, and configure hardware meticulously:

  • Modern hardware mode (vintage for older PCs).
  • USB controllers.
  • Universal audio driver.
  • Network adapters (Broadcom Ethernet detected seamlessly).
  • VirtualBox guest additions (no VMware love).

Name your machine, set workgroup and username, review the summary, and proceed. Formatting erases data, but a startup chime greets success.

The Workplace Shell: Familiar Yet Enhanced

Section titled “The Workplace Shell: Familiar Yet Enhanced”

Boot into a desktop echoing classic OS/2: draggable icons, right-click menus, and multiple virtual desktops (non-draggable windows, unlike Xerox Rooms). Higher-resolution graphics drivers deliver true color, far beyond basic VGA.

Preinstalled gems include Firefox ESR 45.9.0 (2017 vintage) and Thunderbird—dated for web but well suited for legacy tasks. Games like IBM’s OS/2 Chess, Klondike Solitaire 3.0, and Mahjong Solitaire 2.2 provide downtime diversion.

Running Legacy Software: WordPerfect Triumph (Mostly)

Section titled “Running Legacy Software: WordPerfect Triumph (Mostly)”

ArcaOS runs OS/2 apps well. Installing WordPerfect 5.2 for OS/2 (a $495 relic from 1993) via floppy emulates ’90s workflows. USB floppies faltered, so an internal drive on a 2000s-era PC succeeded—after swapping seven disks (Disk 6 corrupted, skipping optional files).

Custom install grabs all components, CUA keyboard layout, and even an Epson FX-80 printer driver. Post-reboot, launch WP: type “Hello World,” save (Shift+F3, not Ctrl+S), copy-paste works. Quirks like color inversion on Enter or missing Ctrl+A persist, but core functionality works. Thesaurus, speller, and file manager integrate smoothly.

Modern Touches: Packages, Win-OS/2, and More

Section titled “Modern Touches: Packages, Win-OS/2, and More”

System Setup houses mouse/keyboard tweaks, registry editor, and a network-aware package manager. Browse repositories for FFmpeg, Adobe fonts, or VNC (client/server). Dependencies resolve automatically; progress bars slide playfully across desktops.

Command prompts summon Win-OS/2, OS/2’s vaunted Windows 3.1 subsystem—“a better DOS than DOS, a better Windows than Windows.” Run Program Manager windowed or fullscreen, tweak colors (Arizona scheme, anyone?), and execute 16-bit apps natively.

Not everyday surfers—web support lags. It’s for enterprises or enthusiasts preserving OS/2 ecosystems on x86-64 hardware, sidestepping emulation hassles. Active development and IBM licensing ensure viability.

ArcaOS proves OS/2’s spirit lives, blending nostalgia with practicality. For OS/2 faithful, it’s a lifeline; for retro explorers, a portal to computing’s overlooked chapter.