4

For some projects I do or work on sometimes it is usually best that we squash/rebase all changes into a single commit. However, I was wondering how this affects the contributions page on github.

For example, if I spent 2 months pushing changes to a project I created and then after 2 months decided to rebase it to one single commit, would github remove all the contribution cubes on the map for the past two months?

riace
  • 111
  • 1
  • 9

2 Answers2

3

I saw this still here so I figured I might as well answer the question. So the answer is YES. It will remove the contributions from the graph. It won't do it right away because commits that are no longer being pointed to by anything can technically still be reached for awhile but are eventually garbage collected and thus removed from your contributions page.

riace
  • 111
  • 1
  • 9
2

The reference page is "Why are my contributions not showing up on my profile?"

Commits will appear on your contributions graph if they meet all of the following conditions:

  • The email address used for the commits is associated with your GitHub account.
  • The commits were made in a standalone repository, not a fork.
  • The commits were made:
    • In the repository's default branch (usually master)

So if your rebase affect commits in master, chances are your contribution page would reflect that.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Note to self: That was my **19000th answer** on Stack Overflow (in 114 months), 5 months after the [18000th answer](https://stackoverflow.com/a/46860745/6309). Before that, [17000th answer](https://stackoverflow.com/a/43703956/6309), [16000th answer](http://stackoverflow.com/a/40698777/6309), [15000th answer](http://stackoverflow.com/a/37539529/6309) [14000th answer](http://stackoverflow.com/a/34327286/6309), [1300th answer](http://stackoverflow.com/a/31640408/6309). [12000th answer](http://stackoverflow.com/a/28412501/6309); [1100th answer](http://stackoverflow.com/a/25821796/6309), ... – VonC Jan 22 '20 at 13:03