fooberry

Sweetness without context.

Passion vs Stuff

September 4th 2010

Over the past view days I once again went undercover at a Ruby conference, Ruby Hoedown in Nahsville, Tennessee. I say undercover because I’m not a rubyist by trade, but only as a hobbyist…

Evolutionary Git Prompt

August 6th 2010

As might have been assumed in my previous post we are transitioning to git and Im tailoring my command prompt to something that suits the way I think and the information I want to see change over time. Right now my prompt gives me several immediate clues:

  • the branch name
  • if the branch is dirty (via red)
  • if there are files being staged (via yellow)
  • what the changes are
    • + adding files
    • ~ changing files
    • – removing files
    • ? untracked files
    • –> renaming files

As I use git more and more, not scenarios arise. The most recent one is what happens if you change a file after you stage it.

 SS-2010.08.06-10.34.45

In this case we staged a and then made more changes. What should the command prompt look like? It is something that is important to me because I might be unaware that there are changes that arent going to be committed. 

But how do you show that? That other symbols Im using are pretty clear. What about this case?

Maybe something like:

d:\temp\foo (master ~1~) >

I kind a like that because it tells me there is one file will only partially be committed. The prompt could get very large but given this case is rare, its unlikely to be that big of a deal.  Those changes made after the stage will not be committed.