Liran Tal
💚@nodejs Security WG member | Core team @meanjs, #dockly | Author: 📘Essential Node.js Security ✨ Engineering Manager @nielsen-oss | ❤️#opensource #javascript
codecamp 2017
Engineering Manager at Nielsen
Node.js, Security, and Open Source evangelist
source: http://blogs.perl.org/users/graham_knop/
Single Repository
Manage per-user access-control
Many dangling & long-lived branches
Suits traditional product release cycles
source: https://github.com/facebook/react-devtools
source: https://twitter.com/HenryHoffman/status/694184106440200192
Merge-Commits
Preserve ancestry
Represent every single change on the branch
Group commits
Simple workflow
Clutter the git history
"When the Intern is still learning git" - Reddit post
source: https://www.reddit.com/r/ProgrammerHumor/comments/4eflwl/when_the_intern_is_still_learning_git/
git merge <feature_branch>
sometimes leads to fast-forward
No standards
No scoping
Doesn't convey the intent of change
source: https://github.com/google/guava/
source: https://martinfowler.com/bliki/BranchByAbstraction.html
source: https://martinfowler.com/bliki/BranchByAbstraction.html
Distributed collaboration model
Governance & Cross-team collaboration
Keep upstream repo "in shape"
Foster for Open Source activism
Empower and Recognise Contributors
Empower and Recognise Contributors
Empower and Recognise Contributors
Empower and Recognise Contributors
Empower and Recognise Contributors
Foster Code Review
Increase Developer Confidence:
Builds, Static Analysis, Code Quality, SecOps
Template-based issues
.github/PULL_REQUEST_TEMPLATE.md
# Summary
## Proposed Changes
-
-
## Checklist
- [ ] I added tests
- [ ] I updated the README if necessary
- [ ] This PR introduces a breaking change
- [ ] Fixed issue #
- [ ] I added a picture of a cute animal cause it's fun
Template-based issues
.github/PULL_REQUEST_TEMPLATE.md
source: https://gist.github.com/leesmith/8441773
source: https://developer.atlassian.com/blog/2014/12/pull-request-merge-strategies-the-great-debate/
Every single commit is tested and deployable
Linear sequence of changes through-time
Makes it easy to git bisect
A change is introduced as one commit
History remains as part of PR + Branch
in Downstream repo
Rebase your own work, not public work
With rebase commits are ordered when you insert
them, not when you create them.
Standards for
fix, chore, feat, test
Scoped areas of change
Employ Commitizen
source: https://github.com/angular/angular.js
Upstream
Origin
Fork
$ git clone git@github.com/<origin>
$ git remote add upstream git@github.com/<upstream>
Upstream
Origin
on branch master
$ git checkout -b feat/sync-export-btn
$ git add .
$ yarn run commit
$ git push origin HEAD
New
Branch
feat/xyz
Upstream
Origin
feat/xyz
Create
PR
Upstream
Origin
feat/xyz
Sync
w/ master
on branch feat/sync-export-btn
$ git checkout master
$ git fetch upstream
$ git rebase upstream/master
$ git checkout feat/sync-export-btn
on branch feat/sync-export-btn
$ git rebase upstream/master
Upstream
Origin
feat/xyz
Update
PR
on branch feat/sync-export-btn
$ git push origin HEAD --force
Upstream
Origin
feat/xyz
Merge
PR
Don't be shy to reach out to me!
By Liran Tal
Git is wonderful in it’s flexibility but not all workflows created equal. There’s a good chance your workflow could be optimized and scaled well as your team and org grows. In this talk I will share how the processes, workflows and standards that we employ at Nielsen’s Marketing Cloud enable us to adapt a CI/CD culture, take control again on our git history and foster collaboration and confidence throughout the organization.
💚@nodejs Security WG member | Core team @meanjs, #dockly | Author: 📘Essential Node.js Security ✨ Engineering Manager @nielsen-oss | ❤️#opensource #javascript