question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Showing number of commits from last 1 year instead of the current year

See original GitHub issue

Describe the bug The card is showing the number of commits from the last 1 year. Like: Total Commits (2021): 1.5k. As it’s saying 2021 in the bracket, then shouldn’t it either show the commits (620) from the year 2021 or show Last 1 year instead of 2021?

Expected behavior It should show the commit from the current year or change Total Commits (2021) to Total Commits (Last 1 year).

Screenshots / Live demo link (paste the github-readme-stats link as markdown image) Screenshot 2021-05-11 at 1 22 03 PM

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rickstaacommented, Oct 10, 2022

As pointed out in #1815 the current behaviour is misleading and should be fixed. As pointed out by @hashfx the card should have an option to choose between year-wise, current year or total. Further, the active mode should be displayed on the card. I am currently very short on time, so I can not implement this myself but feel free to create a PR for this feature to review. I added the label since I think this is an important bug that should be fixed.

1reaction
florianbussmanncommented, May 11, 2021

Yes, the expected behavior is to show the contributions from last year and I support your opinion that this is misleading https://github.com/anuraghazra/github-readme-stats/pull/211#issue-457030914

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I get the Git commit count? - Stack Overflow
git shortlog by itself does not address the original question of total number of commits (not grouped by author). Use git rev-list HEAD...
Read more >
Counting All Git Commits from All Authors and More with Git ...
This could be handy to see how many people committed to a repo or find out who the recent contributers are.
Read more >
Using Git Log to Show Last Month's Commits - Element 84
I can show all of my commits for the month of March with this command. If we substitute those two in place of...
Read more >
2.3 Git Basics - Viewing the Commit History
This command works with lots of formats — you can specify a specific date like "2008-01-15" , or a relative date such as...
Read more >
Get Contributor stats from git - Lost in Details
The command is broken up as follows: git shortlog summarizes git log; -s suppresses the description of the commits and shows only the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found