0
Code Collaboration
with
Git + Stash
+ Bamboo
Sven Peters
@svenpet
http://svenpet.com
Happy Ambassador
Lonesome Cowboy
The trouble starts
with the team
It's not your code
It's your teams code
C
D
E
T GETHER
get help
Bringing code together
Sharing code with others
Protecting your code
C
D
E
T GETHER
Your coding workflow!
Bringing code together
C
D
E
T GETHER
Branching
is cool!
Are
you
crazy?
MERGE
HELL
Branching
is cool!
DVCS rocks
Git
Mercurial
A branch
for every issue
Branches
have short lives
~ 2 days
What about
Continuous Integration ?
Builds
set up for the main branch
plan branches
This is not
Continuous Integration
Auto merge branches
master
change
feature branch
push changes
Option #1
Auto merge branches
feature branch
change
master
push changes
Option #2
Alright, maybe it is :(
Bamboo
C
D
E
T GETHER
Sharing code with others
I've written that
code. It's faster
when I just fix it.
Do you have such a team member?
I can't tell you how
this works.
It...
I want to protect
my job!
Do you have such a team member?
Do you have such a team member?
Fire
him!
learn
better
quality
feel better
blame
Why do you want to discuss
your code changes?
Discuss your code changes
they get merged!
before
use Pull Requests
use Pull Requests
what do
you think?
create
use Pull Requests
what do
you think?
invite
use Pull Requests
what do
you think?
discuss & approve
use Pull Requests
what do
you think?
merge
use Pull Requests
I know @Ben has
already written an
algorithm for that
involve
Dem Time
on Codeis great !
Share and Collaborate
on Code
should be easy and fast
Share and Collaborate
Simple Workflow
Pull
Request
Branch
Merge
Simple Workflow
Pull
Request
Branch
Merge
No Roles
C
D
E
T GETHER
Protecting your code
C
D
E
T GETHER
Make sure....
Pull
Request
Branch
Merge
No Roles
Simple Workflow
Pull
Request
Branch
Merge
No Roles
Simple Workflow
Pull
Request
Branch
Merge
Some Roles
Simple Workflow
Branch Permissions
Making sure
that the right people can merge code
into the right branches
#1
Pull
Request
Merge
minimum two approvals
Review Rules
Pull
Request
Merge
Review Rules
Making sure
that the somebody reviewed the code
#2
Pull
Request
Merge
Build Rules
Pull
Request
Merge
Build Rules
Making sure
that the build stays green after a merge
#3
Project Permissions
Project
Wonderland
Project
Fairytale
Making sure
that the right people have access
#4
to the code they need
Security DevSpeed
The Repo Guard
Beware
Can I get a new Repository?
Please!
Can I get a new Repository?
I'll do in 3
days
Create Repository
Making sure
that the development team can move fast
#5
Your coding workflow!
Teams are different
so are their workflows
Feature Branch
Workflow
Fork
Workflow
ForkWhat is a ?
Makes a copy of a repository on the server
No direct pushing to the original remote repository
Synch chang...
ForkWhy a in the enterprise?
tweaking libraries
innovation spikes
protecting components
reduce noise
interaction with cont...
Some people
need more
Features
1.
Features
2
Feature 1:
Stash Add-ons
Feature 2:
Write a hook!
Protect unmerged branch hook
you must merge before you delete a branch
Write a hook!
Unaprove Reviewer hook
new code in a pull request must be reviewed!
Write a hook!
Branch from green build hook
never branch from a red build
Hooks
Add-Ons
or download one
see code
see issue details
see build status
Code On!
svenpet.com/slides
@svenpet
http://svenpet.com
Code Collaboration With Git & Stash (and Bamboo)
Upcoming SlideShare
Loading in...5
×

Code Collaboration With Git & Stash (and Bamboo)

3,485

Published on

Published in: Technology, Self Improvement

Transcript of "Code Collaboration With Git & Stash (and Bamboo)"

  1. 1. Code Collaboration with Git + Stash + Bamboo
  2. 2. Sven Peters @svenpet http://svenpet.com Happy Ambassador
  3. 3. Lonesome Cowboy
  4. 4. The trouble starts with the team
  5. 5. It's not your code It's your teams code
  6. 6. C D E T GETHER get help
  7. 7. Bringing code together Sharing code with others Protecting your code C D E T GETHER Your coding workflow!
  8. 8. Bringing code together C D E T GETHER
  9. 9. Branching is cool!
  10. 10. Are you crazy?
  11. 11. MERGE HELL
  12. 12. Branching is cool!
  13. 13. DVCS rocks Git Mercurial
  14. 14. A branch for every issue
  15. 15. Branches have short lives ~ 2 days
  16. 16. What about Continuous Integration ?
  17. 17. Builds set up for the main branch
  18. 18. plan branches
  19. 19. This is not Continuous Integration
  20. 20. Auto merge branches master change feature branch push changes Option #1
  21. 21. Auto merge branches feature branch change master push changes Option #2
  22. 22. Alright, maybe it is :(
  23. 23. Bamboo
  24. 24. C D E T GETHER Sharing code with others
  25. 25. I've written that code. It's faster when I just fix it. Do you have such a team member? I can't tell you how this works. It's too complicated. This is a very sensitive area... You can easily break things
  26. 26. I want to protect my job! Do you have such a team member?
  27. 27. Do you have such a team member? Fire him!
  28. 28. learn better quality feel better blame Why do you want to discuss your code changes?
  29. 29. Discuss your code changes they get merged! before use Pull Requests
  30. 30. use Pull Requests what do you think? create
  31. 31. use Pull Requests what do you think? invite
  32. 32. use Pull Requests what do you think? discuss & approve
  33. 33. use Pull Requests what do you think? merge
  34. 34. use Pull Requests I know @Ben has already written an algorithm for that involve
  35. 35. Dem Time
  36. 36. on Codeis great ! Share and Collaborate
  37. 37. on Code should be easy and fast Share and Collaborate
  38. 38. Simple Workflow Pull Request Branch Merge
  39. 39. Simple Workflow Pull Request Branch Merge No Roles
  40. 40. C D E T GETHER Protecting your code
  41. 41. C D E T GETHER Make sure....
  42. 42. Pull Request Branch Merge No Roles Simple Workflow
  43. 43. Pull Request Branch Merge No Roles Simple Workflow
  44. 44. Pull Request Branch Merge Some Roles Simple Workflow
  45. 45. Branch Permissions
  46. 46. Making sure that the right people can merge code into the right branches #1
  47. 47. Pull Request Merge minimum two approvals Review Rules
  48. 48. Pull Request Merge Review Rules
  49. 49. Making sure that the somebody reviewed the code #2
  50. 50. Pull Request Merge Build Rules
  51. 51. Pull Request Merge Build Rules
  52. 52. Making sure that the build stays green after a merge #3
  53. 53. Project Permissions Project Wonderland Project Fairytale
  54. 54. Making sure that the right people have access #4 to the code they need
  55. 55. Security DevSpeed
  56. 56. The Repo Guard Beware
  57. 57. Can I get a new Repository? Please!
  58. 58. Can I get a new Repository? I'll do in 3 days
  59. 59. Create Repository
  60. 60. Making sure that the development team can move fast #5
  61. 61. Your coding workflow!
  62. 62. Teams are different so are their workflows
  63. 63. Feature Branch Workflow
  64. 64. Fork Workflow
  65. 65. ForkWhat is a ? Makes a copy of a repository on the server No direct pushing to the original remote repository Synch changes from the original remote repository automatic synch can be activated in Stash
  66. 66. ForkWhy a in the enterprise? tweaking libraries innovation spikes protecting components reduce noise interaction with contractors instead of branch permissions
  67. 67. Some people need more
  68. 68. Features 1.
  69. 69. Features 2
  70. 70. Feature 1: Stash Add-ons
  71. 71. Feature 2:
  72. 72. Write a hook! Protect unmerged branch hook you must merge before you delete a branch
  73. 73. Write a hook! Unaprove Reviewer hook new code in a pull request must be reviewed!
  74. 74. Write a hook! Branch from green build hook never branch from a red build
  75. 75. Hooks Add-Ons or download one
  76. 76. see code see issue details see build status
  77. 77. Code On! svenpet.com/slides @svenpet http://svenpet.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×