GIT,  Tutorials

Make git log great again!

This trick is a better way to show and visualize git history in the command line. Working in anywhere git runs.

This is the command to do it

Copy this command and paste into your git working directory:

That’s all, right? But I have some magic with this trick. Moving on!

Create an alias in ~/.gitconfig for confident using

After this step, you can call the whole command above just by “git lg” instead of git log.

  1. Open .gitconfig file in any text editor. (nano, vim, notepad, MSWord, etc.)
  2. Add command below the [alias] section.
  3. The entire file might look like this:

BE CAREFULL: If these steps are too complex, follow the best practice I mention hereafter.

Best practice:

Copy and paste to your terminal, one-time setup forever!

Now, cd into your git working directory and type: git lg

Linus torvalds

Thanks to codingforeverybody.com with ♥

Chào bạn, mình là lập trình viên, yêu thiên nhiên và ghiền chụp ảnh. Blog này được tạo nên để lưu giữ những trải nghiệm cũng như ghi chú các kiến thức mình học được. Hy vọng bạn sẽ tìm thấy gì đó hay ho ở đây. 🌸

5 2 votes
Article Rating
Subscribe
Notify of
guest

1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments