Skip to content

Instantly share code, notes, and snippets.

@4sskick
Last active December 10, 2025 03:16
Show Gist options
  • Select an option

  • Save 4sskick/309c2287ba4a06dcdbf1e5b9a8a03c6a to your computer and use it in GitHub Desktop.

Select an option

Save 4sskick/309c2287ba4a06dcdbf1e5b9a8a03c6a to your computer and use it in GitHub Desktop.
Manager's Silly Request, gather all the Commit ID

Recently, my manager assigned me a rather unusual task --- to manually collect every commit ID related to a Jira card.
While Git already provides tools to automate this, I still had to gather all commit hashes one by one.

📝 What Happened

I was working on feature updates when suddenly my manager pinged me: > "Please list down all commit IDs for Jira card J2667."

At first, I thought it was a joke.
But no --- the request was real.

🤦‍♂️ The "Silly" Part

Instead of checking Git logs automatically, the expectation was that I manually: - Search all related commits\

  • Copy each commit hash\
  • Paste them into a document

A task that Git can solve in one command:

git log --all --grep="J2667" --pretty=format:"%H"

✔️ Final Output

$ git log --all --grep="J2667" --pretty=format:"%H"
b5bd938386dc31eee8b9f2d20550d7132a629e31
3022080cdf721e2e9f1825f3c30b0b08207eb7ca
c4d4b0e9542dd5e0f907e68b4df4fe7bb6723291
728357d521b922c030eb8d2ce54f4a403895b5af
5b2f4742db5616182b5bc982d54cc8d945545006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment