Here is a sample session for working on a trivial bugfix:
# ensure your dev branch is up-to-date
> git checkout dev
> git pull
# decide to work on a new feature or bug-fix
> ti sync
> ti new
# add a succinct, descriptive title and a longer description
> ti show <ticket_id_just_created>
,----
| Title: remove erroneous whitespace from tools/ngsa_align/ngsa_align.cc
| TicId: 5aeacb3db5bb147c68472f42084a0d6a573eca9d
|
| Assigned: cthachuk
| Opened: Tue May 04 09:29:42 -0700 2010 (0 days)
| State: OPEN
| Points: no estimate
| Tags: bug
|
| Comments (1):
|
| * Added 05/04 09:29 by cthachuk@cs.ubc.ca
|
| In general, we should be careful of unecessary whitespace at the end
| of lines. It can play havoc on diff algorithms and git in general.
`----
# create a new topic branch off of your updated dev branch
> git checkout -b bugfix-5aeacb
# make changes, and create logical commits as necessary
> emacs tools/ngsa_align/ngsa_align.cc
> git add tools/ngsa_align/ngsa_align.cc
> git commit
> git log -1
,----
| commit cdafc93fb15d049265b2c6bea82219257b70fadf
| Author: Chris Thachuk <cthachuk@cs.ubc.ca>
| Date: Tue May 4 09:32:27 2010 -0700
|
| Fixes ticket 5aeacb
|
| Removes erroneous whitespace from ngsa_align.cc file.
`----
# ensure your dev is still up-to-date
> git checkout dev
> git pull
# rebase your topic branch so that it will cleanly apply on top of dev
> git checkout bugfix-5aeacb
> git rebase dev
# finally, you can merge your topic branch into dev, and delete it
> git checkout dev
> git merge bugfix-5aeacb
> git branch -d bugfix-5aeacb
# note that after your rebase operation, your commit-id(s) may have changed
> git log -1
,----
| commit cdafc93fb15d049265b2c6bea82219257b70fadf
| Author: Chris Thachuk <cthachuk@cs.ubc.ca>
| Date: Tue May 4 09:32:27 2010 -0700
|
| Fixes ticket 5aeacb
|
| Removes erroneous whitespace from ngsa_align.cc file.
`----
# push the changes upstream
> git push
# close the ticket and sync upstream
> ti checkout <your_ticket_id>
> ti state resolved
> ti sync
|