4. A VCS is more than a code backup:
Centralized repository
Revisions history
Team management
Milestones
Branches for new (or experimental) features
Revise other developers code
6. Do you can use Git with no defined
workflow?
No.
7. Whatâs is the best workflow for you
or your team?
There are some variables:
1. Complexity of your product
2. Size of your team
3. Itâs an in production software or itâs not
released yet?
8. What do you need? (I)
Centralized repository.
Most popular:
â Github
â Free for public repositories
â Bitbucket
â Also free for private repositories
9. What do you need? (II)
Issue tracker.
There are many options. My advice is a pure issue
tracker, not a collaborative utility such Trello, Kanbanflow,
etc.
17 Bug and issue tracking systems:
http://mashable.com/2014/02/16/bug-tracking-apps/
We use Mantis: http://www.mantisbt.org/
In few years, you get thousands of issues
10. Features an Issue tracker should have
â Project oriented (multi project)
â Support for SCRUM
â Release numbering
â Roles for users
â Time tracking (estimate, remaining, done)
â Priority management
â Searching
â Logging
â Customization for, by example, integration with other in
house tools
â External interface for customers, to show them project
pace, let them to make comments, report problems âŠ
But do not authorize them to create new issues!
11. What do you need? (III)
A project master person
1. Can be the Product Owner in SCRUM.
2. Revises all code before merging
3. Fixes all code conflicts
git diff is not enough, there are some utilities. We can use
them with git difftool and git mergetool
Meld
http://meld.sourceforge.net/install.html
p4merge
http://www.perforce.com
Diffmerge
http://www.sourcegear.com/diffmerge/
13. Branches.
Master
â Tagged for every release version
â Is untouchable. Any change implies a new release
â Only project master can merge to it
devname-m<issue#>
â Every issue (new features or bug fixes) have is own branch. Prepended by
developer name: Example: victoria-m1234
In one developer team, just use m<issue#>
Staging or QA (quality assurance)
Optional in small projects
â Release candidates
â Used for testing or limited releases to a small group of users
14. Our goal is having an stable Master Branch in every
moment.
New features must be implemented in a separate branch.
This branch can be abandoned not affecting project stability.
Every developer must frequently pull from last stable branch
for starting a new issue:
Imagine issue â1234 Add new taxes calculation to intl.
invoicesâ
In Victoriaâs computer ...
15. Day 2
⊠work on it âŠ
git commit -am âWIP do calcs in cases a and bâ
git push
Day 1
git pull origin master
git checkout -b victoria-m1234
⊠work on it âŠ
git commit -am âWIP define new fields on tax calculationâ
git push --set-upstream origin victoria-m1234
Day 3
⊠work on it ⊠and finish!
git commit -am â1234 Add new taxes calculation to intl. invoicesâ
git push
Update issue tracker with incidences, time spent, etc regarding this issue.
Inform project manager (he gets informed by email from issue tracker)
16. In projectâs manager computer ⊠(BTW, heâs name is Sheldom)
git fetch origin
New branches created (victoria-m1234 and others)
git checkout staging
git merge sheldom # here are all issues done by all developers
git push origin
repeat with other developers branches and issues
Fix conflicts, if any
git checkout sheldom
git diff victoria-m1234 # seems good job
git merge victoria-m1234 # no conflicts Great!
git checkout staging
git merge sheldom
17. Variants:
â Merge locally your
issue branches and
just push to origin
your named branch
â Use rebase to
remove WIP
commits
â Use pull request
Approve and merge
code online
â Use tags for
releases
â Drop issue
branches after
merging
18. Advices
â Commit, commit and commit! (thanks, Nick)
â Before any commit (also the 4 am ones),
use git diff to revise your changes from last
commit or reference branch
â Write USEFUL commit messages
â Is better to create unnecessary branches
â Use stash for rapid change between
contexts
â The issue ID is your friend. Use it
everywhere: commit messages and
comments in code
19. Advices for issue tracking
â Be verbose: When writing a new issue, may
be you or another developer will work on it
weeks or months later. Then nobody will
remember why this issue was created
â Attach sample data, user emails, screen
shots, etc to your issues
â If itâs a bug, write how to reproduce it. Also
who reported it (end user?) Probably youâll
need more info
â Every issue should have an estimated time
to completion. Compare with your actual
results. Itâll help to your team to make more