hackergotchi

treitter

Let's Push Things Forward

Maximizing social utility for fun and (modest) profit


Previous Entry Share Next Entry
hackergotchi
treitter

Interactive rebasing (the git command, not the sport)

Federico,

git rebase -i has quickly become one of my favorite git features for all the reasons you state, plus one of my common work-flows:

  1. refactor existing code (commenting out lines that I plan to remove). Check that it works. Commit.
  2. cut commented code. Check that it works. Commit.

I tend to comment old lines instead of cutting them immediately, because I often realize I needed some of them or that my new idea isn't quite workable. With git rebase -i, I can squash those two commits together before pushing them to the mainline repo.

And, of course, it's nice to look like I can refactor hundreds of lines flawlessly in a single commit :) (I've done that in subversion, but it takes painfully long to ensure you haven't broken anything before you commit)


In other news, the Telepathy repositories are being converted from darcs to git. Score another point for git in the endless DVCS debate!

  • 1
the Telepathy repositories are being converted from darcs to git. Score another point for git in the endless DVCS debate!

Yay! sure it does but i am wondering how you convinced Rob that moving away from darcs isn't a sin. :)

One of my favorites at the moment is git add --patch for reasons well explained by my coworker Ryan.

  • 1
?

Log in

No account? Create an account