HackPig520

HackPig520 的博客

我是HackPig520,一个前端工程师,喜欢Web3和Minecraft。
github
gitlab
bilibili
tg_channel
keybase
email
twitter
zhihu
pixiv

View Git history, but animated

This is a synchronized article with authorization, original link: https://www.liuzhen932.top/posts/default/githistory

It's 4202 now, and there are countless tools available to view Git commit history, including CLI (just git history) and GUI (Github Desktop).

This brings me to a ⭐ treasure project I found, pomber/git-history is an online tool that can present the change history of repository files quickly and clearly in an animated way.

Want to give it a try? It's very simple:

  1. Go to a file in GitHub / GitLab / Bitbucket
  2. Replace github.com with github.githistory.xyz
  3. And that's it, use the left and right arrow keys to view the changes in animated form

Demo provided by the official website

Compared to the Blame method we usually use, this tool provides a faster and more intuitive way to see how past commits have affected files.

The author also provides bookmarks and browser extensions for quick use:

/* Bookmark Original: https://github.com/pomber/git-history?tab=readme-ov-file#browsers */
javascript: (function() {
  var url = window.location.href;
  var regEx = /^(https?\:\/\/)(www\.)?(github|gitlab|bitbucket)\.(com|org)\/(.*)$/i;
  if (regEx.test(url)) {
    url = url.replace(regEx, "$1$3.githistory.xyz/$5");
    window.open(url, "_blank");
  } else {
    alert("Not a Git File URL");
  }
})();

You can download the browser extension version here, and you can even download the CLI version for local use here.

Well, that's the treasure project I recently discovered, thank you for reading, see you next time!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.