Skip to content

Instantly share code, notes, and snippets.

@kjell
Created December 11, 2008 20:48
Show Gist options
  • Save kjell/34869 to your computer and use it in GitHub Desktop.
Save kjell/34869 to your computer and use it in GitHub Desktop.
A cheap–branching based approach to issue tracking.
# So who needs a bug–tracker when you can do it all via cheap, easy, fast, local branching in git?
[kjell@adelaide ~/D/forest{master}]> git branch
* master
refactor/indexer
refactor/lose-settings
refactor/top-level-lib
refactor/write-files
rework-entries
# I want to fix something, so create a topic branch in the fix/ namespace, and there we go.
# It's in the system sitting right there under your nose.
# No having to subscribe to RSS feeds of issues. No pretending to pay attention to them either.
[kjell@adelaide ~/D/forest{master}]> git co -b fix/flickr-ranger-slowness
Switched to a new branch "fix/flickr-ranger-slowness"
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch
* fix/flickr-ranger-slowness
master
refactor/indexer
refactor/lose-settings
refactor/top-level-lib
refactor/write-files
rework-entries
# When I get the itch to refactor something that works perfectly well, I do the same thing.
# Here a branch that was about a refactoring is misplaced in my imaginary hierarchy, so recategorize!
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch
* fix/flickr-ranger-slowness
master
refactor/indexer
refactor/lose-settings
refactor/top-level-lib
refactor/write-files
rework-entries
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch -m {,refactor/}rework-entries
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch
* fix/flickr-ranger-slowness
master
refactor/indexer
refactor/lose-settings
refactor/rework-entries
refactor/top-level-lib
refactor/write-files
# And once you do refactor or fix one of these topics, just pop it off as {refactor,fix}ed:
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch -m refactor{,ed}/write-files
[kjell@adelaide ~/D/forest{fix/flickr-ranger-slowness}]> git branch
* fix/flickr-ranger-slowness
master
refactor/indexer
refactor/lose-settings
refactor/rework-entries
refactor/top-level-lib
refactored/write-files
# Awesome!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment