Skip to content

Instantly share code, notes, and snippets.

View palashmon's full-sized avatar
🎯
Focusing

Palash Mondal palashmon

🎯
Focusing
View GitHub Profile
@palashmon
palashmon / Child1Props.d.ts
Last active February 27, 2024 05:13
Creating and Importing Multiple TypeScript Declaration Files as a Single Index File
export interface Child1Props {
name: string;
languages: Array<string>;
}
@palashmon
palashmon / Readme.md
Last active March 16, 2025 18:51
Creating JSDoc `@types` for Different Data Types in JavaScript
@palashmon
palashmon / Readme.md
Created February 19, 2024 08:30
Display A List Of Git Branches Ordered By Most Recent Commits

Display A List Of Git Branches Ordered By Most Recent Commits

This file provides commands to display a list of Git branches ordered by the 20 most recent commits, both locally and including remote branches. These commands are helpful for developers to easily track recent activity in the repository.

Show Local Git Branches

To view a list of local Git branches sorted by commit date, use the following command:

git for-each-ref --count=20 --sort=-committerdate refs/heads --format='%(authordate:short) %(color:red)%(objectname:short) %(color:yellow)%(refname:short)%(color:reset) (%(color:green)%(committerdate:relative)%(color:reset))'
@palashmon
palashmon / Readme.md
Created February 19, 2024 10:11
Enhanced Git Log Formatting

Enhanced Git Log Formatting

Overview

The git log command is a powerful tool for viewing the commit history of a Git repository. By default, it displays a detailed list of commits, including commit hashes, commit messages, author names, dates, and branch information. However, customizing the output format can make the log more informative and visually appealing.

In this gist, we'll explore two enhanced git log commands that use custom formatting to provide a clearer and more concise view of the commit history.