L&D series: Take advantage of git diff — stat

--

https://miro.medium.com/max/500/0*adFOXMjRGlBwF5Qc.png

Learning and Development chapter 23.

Prevention is better than cure, right? :D

Anyone who uses git knows about git diff --stat.

git diff — stat result

We could use that syntax to make sure the QA Engineer not making any big changes before create pull request. Let’s create the code !!!

  • Create demo folder => demo-big-changes-code.
  • Install package git-scripts.
  • Create new file => gitDiff.js.
  • Edit file => package.json.

To test, first create big changes (in my case, I delete package-lock.json content) and run npm run git-diff manually in our terminal.

Result in local testing

Full code here => https://github.com/mpermperpisang/demo-big-changes-code.

https://i.stack.imgur.com/Ev0z9.jpg

Now everytime we’re making a big changes, we cannot continue commit to our branch. — MperMperPisang

Reference:

--

--

Ferawati Hartanti Pratiwi
Ferawati Hartanti Pratiwi

Written by Ferawati Hartanti Pratiwi

Continuously striving to elevate QA standards with a quality-focused mindset

No responses yet