Skip to main content

· 4 min read
Hung Viet Nguyen

Git is an essential tool for modern software development. While most developers are familiar with basic commands like git add, git commit, and git push, there are many lesser-known but incredibly useful Git commands that can make your workflow more efficient. This post covers some handy Git commands that might not be part of your daily routine but can be extremely valuable in specific situations:

  • Finding Branches Containing a Specific Commit
  • Finding the Merge Base Between Two Branches
  • Finding Changes Between Commits
  • Stashing Untracked Files
  • Searching Through Commit History
  • Checking Out Pull Requests Locally
  • Recovering Lost Commits

· 2 min read
Hung Viet Nguyen

Sometimes during development, you might encounter situations where console.log has been overridden. This commonly happens in production builds where logging is disabled to prevent exposing sensitive information or to improve performance. However, when debugging, you might need to restore the original console.log functionality.

· One min read
Hung Viet Nguyen

Recently, I migrated a documentation page from Gatsby to Docusaurus. However, after I deployed a new version of the docs but I still see the cached version of the old docs. The reason is that the Gatsby version of the docs has a service worker that caches the artifacts. So, I need to remove the old service worker manually via Chrome Devtools.

· One min read
Hung Viet Nguyen

In some scenarios, you may want to customize the HTML in Jest to align with your actual app's HTML structure. You can do it by one of the following options: