How To Use “git rev-parse” For Diff View And Why Nothing Beats Knowledge Base in Code Editor
2 min readMar 3, 2022
The aim of this page📝 is to share the composition of GitHub’s diff page with the help of SHA of git’s commit. This can be achieved with git rev-parse --short HEAD
command
git rev-parse --short HEAD
bd2bf51
- I need SHA to compose the GitHub URL, the first part is static
- For example, see AWS’s doc such as https://github.com/awsdocs/amazon-kinesis-data-streams-developer-guide/commit/bd2bf51; the first part
https://github.com/awsdocs/amazon-kinesis-data-streams-developer-guide/commit/
is static and the commit SHA is retrieved with the command above - The point it that regular observation of diffs matters a lot with knowledge! This is one of the way of the crucial cultivation of “historical consciousness” within teams.
- As a builder/manager of Knowledge-Base, I am enjoying the feature/view a lot —again, for documentation purposes.
- I also think JamStack environment combined with Knowledge-Centered Support is the stack/methodology I have encountered so far.
- Nothing beats “head-less KB” directly in the editor on a separate screen that gives you the much needed guidance over the code/ticket/incident that you deal with, ideally, also in the editor/terminal (not necessarily).
- This is a radical minimalism towards context switching, the embrace of kaizen, and, as a by-product — the increase of velocity.
- Back to importance of the diffs view — in small teams, you should immediately see that a piece of knowledge has been altered. My The current high-level workflow is
- Local: Make a change to the
.md
document in code editor - Local/Github: Push/Review/Merge
- GitHub: Repo runs GitHub Action upon merge
- GitHub: Actions gets the SHA commit and build the URL
- Slack: Actions sends the Slack notification into
#Knowledge
informing that a piece of knowledge has been updated
- Now just AWS is doing that. Recently, MDN went the same direction.
In short, we are updating the platform to move the content from a MySQL database to being hosted in a GitHub repository).
— MDN Web Docs evolves! Lowdown on the upcoming new platform