
Developer Guidelines
Presentation
•
Professional Development
•
Professional Development
•
Hard
Shivam Tripathi
Used 2+ times
FREE Resource
20 Slides • 0 Questions
1
Developer Guidelines
By Shivam Tripathi, Abhishek Kannojia, Ameen Ahmed
Git Workflow, Git Commit Messages and Code Reviews
2
Git Workflow
Developer Guidelines
Part 1: Git Workflow
3
Problem Statement
Currently, git workflows varies by teams and repositories.
This leads to challenges in collaboration and unnecessary context switching.
Goal is to establish a common git workflow across teams and repositories.
Git Workflow | Problem Statement
Developer Guidelines
4
Feature Branch
Main is the stable branch.
We checkout the feature branch from main branch.
Git Workflow | Feature Branch
Developer Guidelines
main
feat/some-cool-feature
git checkout -b feat/some-cool-feature
checkout
5
Team Collaboration
Developer Guidelines
Each individual developer working on the feature will create their own branch(es) from the main feature branch.
After finishing their individual work, they can open a PR into the main feature branch.
git checkout -b shivam/some-cool-feature
shivam/some-cool-feature
feat/some-cool-feature
PR
Git Workflow | Team collaboration
feat/some-cool-feature
Checkout
6
Dev launch
We checkout from the feature branch a dev branch named exp-dev/<feature_name> which can be connected to a CI/CD pipeline. For every launch, merge feature branch into the dev branch.
Git Workflow | Dev Launch
Developer Guidelines
feat/some-cool-feature
exp-dev/some-cool-feature
CI/CD Deployment
git checkout -b exp-dev/some-cool-feature
7
Prod launch: Experiment
Feature branch owner will create another branch named exp/<feature_name> which will have CI/CD triggers for deployment.
Git Workflow | Prod Launch: Experiment
Developer Guidelines
feat/some-cool-feature
exp/some-cool-feature
CI/CD deployment
git checkout -b exp/some-cool-feature
8
Prod Launch: 100%
Owner(s) of the feature feature branch will create PR against the main branch, which after review will be merged via Bitbucket/Github. Once merged, main will be merged into different running experiment branches with pre configured CI/CD triggers.
Git Workflow | Prod Launch: 100%
Developer Guidelines
feat/some-cool-feature
main
exp/exp-a
exp/exp-b
exp/main
PR
9
Git WorkFlow: Summary
Git Workflow | Summary
Developer Guidelines
10
Part 2: Git Commit Message
Git Commit Message
Developer Guidelines
11
Problem Statement
Currently, git messages are unstructured and unhelpful.
It is difficult to filter out which commits belonged to which features, or what exactly they changed or modified.
It is difficult to establish what was the intent of the commit - was it a fix, a new feature, a regular chore or something else.
Git Commit Message | Problem Statement
Developer Guidelines
12
Message Style
feat(mna/india): Add support for mobile number authentication in India
fix(main/circular-deps): Remove circular dependency bug
refactor(rescore/editRunningGame): Apply strategy pattern when extracting marks
chore(main/node): Bump node version to v16
Git Commit Message | Message Style
Developer Guidelines
13
14
Part 3: Code Reviews
Code Reviews
Developer Guidelines
15
Problem Statement
Currently PRs are an after thought, leading to fat PRs.
Reviewing large PRs in one go is not very productive and it is not possible to do proper justice to the exercise (imagine reviewing 500+ line PR). After a point it reduces to being a formality.
Reviewing PRs as a part of work culture also helps in knowledge transfer for both reviewer and the person who opened the PR.
Code Reviews | Problem Statement
Developer Guidelines
16
Code Reviews | Social
Developer Guidelines
17
Example of PRs
Developer Guidelines
Bad PR
Good PR
18
Code Review: Part of the process
Instead of opening the final PR at the end of the development cycle, we try to break down the feature into smaller sub tasks and regularly make incremental request for reviews which is done regularly (while rest of the development continues).
It is easier and faster to review 50-100 lines of code.
Code Reviews | PR as a part of the process
Developer Guidelines
19
Code Review: Workflow
Individual changes should ideally be merged into feature branches only via Github or Bitbucket PRs.
Changes from feature branches into main MUST be merged via Github or Bitbucket PRs.
For individual branches, developers can use merge, squash, rebase etc as per their convenience.
Code Reviews | Reviews
Developer Guidelines
20
Questions?
Developer Guidelines
Developer Guidelines
By Shivam Tripathi, Abhishek Kannojia, Ameen Ahmed
Git Workflow, Git Commit Messages and Code Reviews
Show answer
Auto Play
Slide 1 / 20
SLIDE
Similar Resources on Wayground
16 questions
Tecnologias Habilitadoras
Presentation
•
Professional Development
15 questions
SCHEMES OF WORK
Presentation
•
Professional Development
15 questions
Radiographic Film Processing
Presentation
•
University - Professi...
14 questions
UNIT 16 OUTDOOR ACTIVITIES MOUNTAIN BIKING IES
Presentation
•
KG - University
17 questions
Professional Emails
Presentation
•
Professional Development
18 questions
Creating a Lesson in Quizziz
Presentation
•
Professional Development
13 questions
From a pandemic to a plastic surgery
Presentation
•
University - Professi...
10 questions
Types of businesses
Presentation
•
Professional Development
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Professional Development
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
10 questions
Food Quiz
Quiz
•
Professional Development
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
23 questions
super heros
Quiz
•
KG - Professional Dev...
11 questions
SOCCER PLAYERS AND TEAMS
Quiz
•
KG - Professional Dev...