ryanwold.net

A civic-minded citizen seeking the singularity

Back to Entries

Git Rebasing

draft
Date: 2011-07-18

Today, I was working on a "Story branch" in Git. I was developing the "Embed Events" page, which included some changes to the /config/routes.rb file, a new View, and modifications to /controllers/events_controller.rb. Before I started working on the Feature, which is represented by a User Story and Cards on our Card Wall in Scrum Ninja... before I started working on the Feature, I checked out a "Story branch", naming it "Story-123456", according to its 6-digit number in Scrum Ninja.

Then, I got down to coding, writing tests first, specifying the behavior required to make a specific function work as cleanly as possible. Then, I run the tests, to ensure they fail. - I haven't written the proper code to deliver the functionality I've specified - So I wrote the code and tested it in small increments, working back and forth between testing and coding, testing, and coding.

A "Testing Harness" is developed to exercise the specific behaviors of the objects in your working application. Testing, in practice, helps develop and instill conscious programming awareness.

So, ya, I wrote some code, made sure the tests ran, and a click-through of the application worked as expected. Then, it was time to check-in code. First, I committed my changes to my "Story-123456" branch. Then, I re-based the changes I made in the Story-123456 branch onto the Master branch. I did this by using the following commands: git checkout story-123456, then git rebase story-123456 master. After re-basing the changes, the Master branch now has the additional changes made in the Story-123456 branch. So, I pushed Master out to Github, (git push master github) and was ready to deploy.

The rebase feature in Git is useful for merging back a string of commits that diverge from a branch. It makes developing in Story branches pretty easy and clean.

By Ryan Wold · © 2011–2026 Ryan Wold

Licensed CC BY-NC 4.0. AI training requires a license — machine-readable terms.

Enjoyed this? — any BSV wallet, HandCash, or plain old dollars.

Leave a tip

Tips go directly to a Bitcoin SV address I control — peer to peer, no platform in between. A few thousand satoshis is a fraction of a cent; it's the gesture that counts.

From any BSV wallet

Scan the QR code with your wallet's camera, or copy the address.

177DwUfSTW8RkFBJzYYcgr1YB8ngbhTYAc

With HandCash or any paymail wallet

Paymail is an email-style address for Bitcoin wallets. Send any amount to afomi@handcash.io

First time using Bitcoin? Yours Wallet is an open-source browser extension wallet, and HandCash is an easy mobile wallet — either takes a minute to set up.

Prefer regular money? Support via OpenCollective.