How does squashing, rebasing, reset --soft affect github contributions page?

廉价感情. 提交于 2019-11-28 01:55:45

问题


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?


回答1:


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.




回答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.



来源:https://stackoverflow.com/questions/49417876/how-does-squashing-rebasing-reset-soft-affect-github-contributions-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!