4

I created a new repo and made a number of commits and pushes.

In the middle of commiting/pushing I realized some commits weren't needed so I "deleted" them both locally and in remote too:

git rebase -i
git push origin +master

After doing this a couple of time, my repo now has 8 commits. This doesn't count those "deleted" commits. However, on my profile page the number of commits for this repo is more, say 12. I realize it counts those "deleted" commit in this count, but how can I make sure it shows only the 8 commits here too?

Note: my question looks like this one but it didn't answer my question.

user3132457
  • 789
  • 2
  • 11
  • 29
  • Did you wait at least 24 hours? Profile page updates are done infrequently (and I would be unsurprised to find out that there is some hack to make it go up right away, much faster than it ever goes down). – torek Mar 03 '20 at 16:22
  • no, it hasn't been a day, but should it really matter? when one makes a commit, count is incremented, so why wouldn't delete simply decrement it? – user3132457 Mar 03 '20 at 16:36
  • 3
    Git is designed to *add* commits to repositories, not to remove them. GitHub's software is similarly designed. They run counters up, not down. Every once in a while they do a real census, and reset counters to real numbers. (This is probably also when they really remove unreachable commits.) – torek Mar 03 '20 at 16:43

0 Answers0