Difference: GitWorkFlow (3 vs. 4)

Revision 42010-05-04 - ChrisThachuk

Line: 1 to 1
 
META TOPICPARENT name="NGSAlignerProject"
Assuming you've set up a working git repository, the typical work flow is as follows:
  1. In your private repo, move to the branch you wish you branch off of,
Line: 43 to 43
 In addition, many branches off of dev will exist from pushes, which can serve as backup and also used when seeking help.
  • Note that other developers should not branch off these non-=dev= branches
Added:
>
>
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
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback